Skip to content
This repository was archived by the owner on Oct 7, 2025. It is now read-only.

Latest commit

 

History

History
27 lines (20 loc) · 461 Bytes

File metadata and controls

27 lines (20 loc) · 461 Bytes

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