• Stars
    star
    156
  • Rank 238,222 (Top 5 %)
  • Language
    Python
  • License
    MIT License
  • Created over 8 years ago
  • Updated almost 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Simple GraphQL client for Python 2.7+

python-graphql-client

Simple GraphQL client for Python 2.7+

Install

pip install graphqlclient

Usage

from graphqlclient import GraphQLClient

client = GraphQLClient('http://graphql-swapi.parseapp.com/')

result = client.execute('''
{
  allFilms {
    films {
      title
    }
  }
}
''')

print(result)

Authorization

Authorization tokens can be added to the request using the client's inject_token method:

client.inject_token('very-long-and-secure-token')

which defaults to http header name Authorization. An alternative http header name for the token can be set by passing in the alternative header name, e.g. for x-api-key:

client.inject_token('very-long-and-secure-token','x-api-key')

License

MIT License

More Repositories

1

graphqlgen

โš™๏ธ Generate type-safe resolvers based upon your GraphQL Schema
TypeScript
817
star
2

graphql-prisma-typescript

๐Ÿก GraphQL server reference implementation (Airbnb clone) in Typescript using Prisma & graphql-yoga
TypeScript
750
star
3

graphql-framework-experiment

Code-First Type-Safe GraphQL Framework
TypeScript
675
star
4

get-graphql-schema

Fetch and print the GraphQL schema from a GraphQL HTTP endpoint. (Can be used for Relay Modern.)
TypeScript
660
star
5

prisma-binding

GraphQL Binding for Prisma 1 (using GraphQL schema delegation)
TypeScript
476
star
6

yoga2

A lightweight 'Ruby on Rails'-like framework for GraphQL
TypeScript
348
star
7

dripip

Opinionated CLI for continuous delivery of npm packages
TypeScript
98
star
8

konn

TypeScript
89
star
9

graphql-import-loader

Webpack loader for `graphql-import`
TypeScript
83
star
10

http-link-dataloader

๐Ÿ“š๐Ÿ“ก HTTP Apollo Link with batching & caching provided by dataloader.
TypeScript
78
star
11

bema

๐ŸŽ Delightful benchmarking for Node.js
TypeScript
72
star
12

graphql-framework-experiment-examples

Runnable examples to help you learn how to use Nexus.
TypeScript
64
star
13

nextjs-graphql-api-examples

Next.js example GraphQL API implementations
TypeScript
38
star
14

next-prisma-plugin

TypeScript
19
star
15

graphqlday.org

JavaScript
12
star
16

oss.prisma.io

Documentation content for oss.prisma.io (GraphQL Playground, GraphQL Yoga, GraphQL Config...)
10
star
17

vscode-next

TypeScript
6
star
18

graphql-config-extension-prisma

TypeScript
6
star
19

renovate-config

Standard Renovate configurations for Labs team projects.
1
star
20

mockapie

TypeScript
1
star
21

team

๐Ÿ‘ฉโ€๐Ÿ”ฌ๐Ÿ‘จโ€๐Ÿ”ฌPast sprint demo recordings & more
1
star