We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0d55d87 commit 150eb3fCopy full SHA for 150eb3f
README.md
@@ -39,6 +39,25 @@ query = gql('''
39
}
40
''')
41
42
+client.execute(query)
43
+```
44
+The example below shows how you can execute queries against a local schema with additional headers
45
+
46
+```python
47
+from gql import gql, Client
48
+from gql.transport.requests import RequestsHTTPTransport
49
50
51
+client = Client(transport = RequestsHTTPTransport(
52
+ url='/graphql',
53
+ headers={'Authorization': 'token'}),
54
+ schema=schema)
55
+query = gql('''
56
+{
57
+ hello
58
+}
59
+''')
60
61
client.execute(query)
62
```
63
0 commit comments