• Stars
    star
    156
  • Rank 239,589 (Top 5 %)
  • Language
    Python
  • License
    MIT License
  • Created over 8 years ago
  • Updated about 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
818
star
2

graphql-prisma-typescript

🏑 GraphQL server reference implementation (Airbnb clone) in Typescript using Prisma & graphql-yoga
TypeScript
749
star
3

graphql-framework-experiment

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

get-graphql-schema

Fetch and print the GraphQL schema from a GraphQL HTTP endpoint. (Can be used for Relay Modern.)
TypeScript
665
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
347
star
7

dripip

Opinionated CLI for continuous delivery of npm packages
TypeScript
100
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
77
star
11

bema

🐎 Delightful benchmarking for Node.js
TypeScript
73
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

mockapie

TypeScript
1
star
20

renovate-config

Standard Renovate configurations for Labs team projects.
1
star
21

team

πŸ‘©β€πŸ”¬πŸ‘¨β€πŸ”¬Past sprint demo recordings & more
1
star
22

prettier-config

Standard Prettier configuration for Labs team projects.
1
star