Skip to content

hsdp/python-graphql-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GraphQL Client

Getting Started

client = GraphQLClient('https://www.graphqlhub.com/graphql')

result = client.query('''
query ($id: String!) {
    hn2 {
        nodeFromHnId(id: $id, isUserId: true) {
            id
        }
    }
}
''', {'id': 'clayallsopp'})

The client constructor can also take a dictionary of additonal headers in a keyword argument headers or as the second parameter.

Tests

To Run Tests

make test