Skip to content

Commit 5b4b519

Browse files
committed
Update docs
1 parent 31ffcbd commit 5b4b519

File tree

9 files changed

+38
-38
lines changed

9 files changed

+38
-38
lines changed

apps/frontend/src/content/docs/integrations/aiohttp.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ methods:
5252
- `async process_result(self, request: aiohttp.web.Request, result: ExecutionResult) -> GraphQLHTTPResponse`
5353
- `def encode_json(self, data: GraphQLHTTPResponse) -> str`
5454

55-
## get_context
55+
### get_context
5656

5757
By overriding `GraphQLView.get_context` you can provide a custom context object
5858
for your resolvers. You can return anything here; by default GraphQLView returns
@@ -83,7 +83,7 @@ called `"example"`.
8383
Then we can use the context in a resolver. In this case the resolver will return
8484
`1`.
8585

86-
## get_root_value
86+
### get_root_value
8787

8888
By overriding `GraphQLView.get_root_value` you can provide a custom root value
8989
for your schema. This is probably not used a lot but it might be useful in
@@ -110,7 +110,7 @@ class Query:
110110
Here we configure a Query where requesting the `name` field will return
111111
`"Patrick"` through the custom root value.
112112

113-
## process_result
113+
### process_result
114114

115115
By overriding `GraphQLView.process_result` you can customize and/or process
116116
results before they are sent to a client. This can be useful for logging errors,
@@ -141,7 +141,7 @@ class MyGraphQLView(GraphQLView):
141141
In this case we are doing the default processing of the result, but it can be
142142
tweaked based on your needs.
143143

144-
## encode_json
144+
### encode_json
145145

146146
`encode_json` allows to customize the encoding of the JSON response. By default
147147
we use `json.dumps` but you can override this method to use a different encoder.

apps/frontend/src/content/docs/integrations/asgi.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ We allow to extend the base `GraphQL` app, by overriding the following methods:
5151
- `async process_result(self, request: Request, result: ExecutionResult) -> GraphQLHTTPResponse`
5252
- `def encode_json(self, response_data: GraphQLHTTPResponse) -> str`
5353

54-
## get_context
54+
### get_context
5555

5656
`get_context` allows to provide a custom context object that can be used in your
5757
resolver. You can return anything here, by default we return a dictionary with
@@ -78,7 +78,7 @@ called "example".
7878
Then we use the context in a resolver, the resolver will return "1" in this
7979
case.
8080

81-
### Setting response headers
81+
#### Setting response headers
8282

8383
It is possible to use `get_context` to set response headers. A common use case
8484
might be cookie-based user authentication, where your login mutation resolver
@@ -97,7 +97,7 @@ class Mutation:
9797
return True
9898
```
9999

100-
### Setting background tasks
100+
#### Setting background tasks
101101

102102
Similarly, [background tasks](https://www.starlette.io/background/) can be set
103103
on the response via the context:
@@ -116,7 +116,7 @@ class Mutation:
116116
info.context["response"].background = BackgroundTask(notify_new_flavour, name)
117117
```
118118

119-
## get_root_value
119+
### get_root_value
120120

121121
`get_root_value` allows to provide a custom root value for your schema, this is
122122
probably not used a lot but it might be useful in certain situations.
@@ -137,7 +137,7 @@ class Query:
137137
Here we are returning a Query where the name is "Patrick", so we when requesting
138138
the field name we'll return "Patrick" in this case.
139139

140-
## process_result
140+
### process_result
141141

142142
`process_result` allows to customize and/or process results before they are sent
143143
to the clients. This can be useful logging errors or hiding them (for example to
@@ -166,7 +166,7 @@ class MyGraphQL(GraphQL):
166166
In this case we are doing the default processing of the result, but it can be
167167
tweaked based on your needs.
168168

169-
## encode_json
169+
### encode_json
170170

171171
`encode_json` allows to customize the encoding of the JSON response. By default
172172
we use `json.dumps` but you can override this method to use a different encoder.

apps/frontend/src/content/docs/integrations/chalice.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ We allow to extend the base `GraphQLView`, by overriding the following methods:
7777
- `process_result(self, request: Request, result: ExecutionResult) -> GraphQLHTTPResponse`
7878
- `encode_json(self, response_data: GraphQLHTTPResponse) -> str`
7979

80-
## get_context
80+
### get_context
8181

8282
`get_context` allows to provide a custom context object that can be used in your
8383
resolver. You can return anything here, by default we return a dictionary with
@@ -103,7 +103,7 @@ called "example".
103103
Then we use the context in a resolver, the resolver will return "1" in this
104104
case.
105105

106-
## get_root_value
106+
### get_root_value
107107

108108
`get_root_value` allows to provide a custom root value for your schema, this is
109109
probably not used a lot but it might be useful in certain situations.
@@ -124,7 +124,7 @@ class Query:
124124
Here we are returning a Query where the name is "Patrick", so we when requesting
125125
the field name we'll return "Patrick" in this case.
126126

127-
## process_result
127+
### process_result
128128

129129
`process_result` allows to customize and/or process results before they are sent
130130
to the clients. This can be useful logging errors or hiding them (for example to
@@ -151,7 +151,7 @@ class MyGraphQLView(GraphQLView):
151151
In this case we are doing the default processing of the result, but it can be
152152
tweaked based on your needs.
153153

154-
## encode_json
154+
### encode_json
155155

156156
`encode_json` allows to customize the encoding of the JSON response. By default
157157
we use `json.dumps` but you can override this method to use a different encoder.

apps/frontend/src/content/docs/integrations/django.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ methods:
191191
- `async process_result(self, request: HttpRequest, result: ExecutionResult) -> GraphQLHTTPResponse`
192192
- `def encode_json(self, data: GraphQLHTTPResponse) -> str`
193193

194-
## get_context
194+
### get_context
195195

196196
`get_context` allows to provide a custom context object that can be used in your
197197
resolver. You can return anything here, by default we return a dictionary with
@@ -216,7 +216,7 @@ called "example".
216216
Then we use the context in a resolver, the resolver will return "1" in this
217217
case.
218218

219-
## get_root_value
219+
### get_root_value
220220

221221
`get_root_value` allows to provide a custom root value for your schema, this is
222222
probably not used a lot but it might be useful in certain situations.
@@ -237,7 +237,7 @@ class Query:
237237
Here we are returning a Query where the name is "Patrick", so we when requesting
238238
the field name we'll return "Patrick" in this case.
239239

240-
## process_result
240+
### process_result
241241

242242
`process_result` allows to customize and/or process results before they are sent
243243
to the clients. This can be useful logging errors or hiding them (for example to
@@ -266,7 +266,7 @@ class MyGraphQLView(AsyncGraphQLView):
266266
In this case we are doing the default processing of the result, but it can be
267267
tweaked based on your needs.
268268

269-
## encode_json
269+
### encode_json
270270

271271
`encode_json` allows to customize the encoding of the JSON response. By default
272272
we use `json.dumps` but you can override this method to use a different encoder.

apps/frontend/src/content/docs/integrations/fastapi.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ The `GraphQLRouter` accepts the following options:
5959
[security implications mentioned in the GraphQL Multipart Request Specification](https://github.com/jaydenseric/graphql-multipart-request-spec/blob/master/readme.md#security)
6060
when enabling this feature.
6161

62-
## context_getter
62+
### context_getter
6363

6464
The `context_getter` option allows you to provide a custom context object that
6565
can be used in your resolver. `context_getter` is a
@@ -178,7 +178,7 @@ requires `.request` indexing.
178178
Then we use the context in a resolver. The resolver will return “Hello John, you
179179
rock!” in this case.
180180

181-
### Setting background tasks
181+
#### Setting background tasks
182182

183183
Similarly,
184184
[background tasks](https://fastapi.tiangolo.com/tutorial/background-tasks/?h=background)
@@ -221,7 +221,7 @@ app.include_router(graphql_app, prefix="/graphql")
221221
If using a custom context class, then background tasks should be stored within
222222
the class object as `.background_tasks`.
223223

224-
## root_value_getter
224+
### root_value_getter
225225

226226
The `root_value_getter` option allows you to provide a custom root value for
227227
your schema. This is most likely a rare usecase but might be useful in certain
@@ -259,7 +259,7 @@ app.include_router(graphql_app, prefix="/graphql")
259259
Here we are returning a Query where the name is "Patrick", so when we request
260260
the field name we'll return "Patrick".
261261

262-
## process_result
262+
### process_result
263263

264264
The `process_result` option allows you to customize and/or process results
265265
before they are sent to the clients. This can be useful for logging errors or
@@ -290,7 +290,7 @@ class MyGraphQLRouter(GraphQLRouter):
290290
In this case we are doing the default processing of the result, but it can be
291291
tweaked based on your needs.
292292

293-
## encode_json
293+
### encode_json
294294

295295
`encode_json` allows to customize the encoding of the JSON response. By default
296296
we use `json.dumps` but you can override this method to use a different encoder.

apps/frontend/src/content/docs/integrations/flask.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ async functions.
6666
</Note>
6767

6868

69-
## get_context
69+
### get_context
7070

7171
`get_context` allows to provide a custom context object that can be used in your
7272
resolver. You can return anything here, by default we return a dictionary with
@@ -92,7 +92,7 @@ called "example".
9292
Then we use the context in a resolver, the resolver will return "1" in this
9393
case.
9494

95-
## get_root_value
95+
### get_root_value
9696

9797
`get_root_value` allows to provide a custom root value for your schema, this is
9898
probably not used a lot but it might be useful in certain situations.
@@ -113,7 +113,7 @@ class Query:
113113
Here we are returning a Query where the name is "Patrick", so we when requesting
114114
the field name we'll return "Patrick" in this case.
115115

116-
## process_result
116+
### process_result
117117

118118
`process_result` allows to customize and/or process results before they are sent
119119
to the clients. This can be useful logging errors or hiding them (for example to
@@ -140,7 +140,7 @@ class MyGraphQLView(GraphQLView):
140140
In this case we are doing the default processing of the result, but it can be
141141
tweaked based on your needs.
142142

143-
## encode_json
143+
### encode_json
144144

145145
`encode_json` allows to customize the encoding of the JSON response. By default
146146
we use `json.dumps` but you can override this method to use a different encoder.

apps/frontend/src/content/docs/integrations/litestar.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ The `make_graphql_controller` function accepts the following options:
6666
[security implications mentioned in the GraphQL Multipart Request Specification](https://github.com/jaydenseric/graphql-multipart-request-spec/blob/master/readme.md#security)
6767
when enabling this feature.
6868

69-
## context_getter
69+
### context_getter
7070

7171
The `context_getter` option allows you to provide a Litestar dependency that
7272
return a custom context object that can be used in your resolver.
@@ -188,7 +188,7 @@ GraphQLController = make_graphql_controller(
188188
app = Litestar(route_handlers=[GraphQLController])
189189
```
190190

191-
### Context typing
191+
#### Context typing
192192

193193
In our previous example using class based context, the actual runtime context a
194194
`CustomContext` type. Because it inherits from `BaseContext`, the `request`,
@@ -283,7 +283,7 @@ GraphQLController = make_graphql_controller(
283283
app = Litestar(route_handlers=[GraphQLController])
284284
```
285285

286-
## root_value_getter
286+
### root_value_getter
287287

288288
The `root_value_getter` option allows you to provide a custom root value that
289289
can be used in your resolver

apps/frontend/src/content/docs/integrations/quart.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ We allow to extend the base `GraphQLView`, by overriding the following methods:
4848
- `process_result(self, result: ExecutionResult) -&gt; GraphQLHTTPResponse`
4949
- `encode_json(self, response_data: GraphQLHTTPResponse) -&gt; str`
5050

51-
## get_context
51+
### get_context
5252

5353
`get_context` allows to provide a custom context object that can be used in your
5454
resolver. You can return anything here, by default we return a dictionary with
@@ -74,7 +74,7 @@ called "example".
7474
Then we use the context in a resolver, the resolver will return "1" in this
7575
case.
7676

77-
## get_root_value
77+
### get_root_value
7878

7979
`get_root_value` allows to provide a custom root value for your schema, this is
8080
probably not used a lot but it might be useful in certain situations.
@@ -95,7 +95,7 @@ class Query:
9595
Here we are returning a Query where the name is "Patrick", so we when requesting
9696
the field name we'll return "Patrick" in this case.
9797

98-
## process_result
98+
### process_result
9999

100100
`process_result` allows to customize and/or process results before they are sent
101101
to the clients. This can be useful logging errors or hiding them (for example to
@@ -122,7 +122,7 @@ class MyGraphQLView(GraphQLView):
122122
In this case we are doing the default processing of the result, but it can be
123123
tweaked based on your needs.
124124

125-
## encode_json
125+
### encode_json
126126

127127
`encode_json` allows to customize the encoding of the JSON response. By default
128128
we use `json.dumps` but you can override this method to use a different encoder.

apps/frontend/src/content/docs/integrations/sanic.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ methods:
4444
- `async get_root_value(self, request: Request) -&gt; Any`
4545
- `async process_result(self, result: ExecutionResult) -&gt; GraphQLHTTPResponse`
4646

47-
## get_context
47+
### get_context
4848

4949
By overriding `GraphQLView.get_context` you can provide a custom context object
5050
for your resolvers. You can return anything here; by default GraphQLView returns
@@ -69,7 +69,7 @@ called `&quot;example&quot;`.
6969
Then we can use the context in a resolver. In this case the resolver will return
7070
`1`.
7171

72-
## get_root_value
72+
### get_root_value
7373

7474
By overriding `GraphQLView.get_root_value` you can provide a custom root value
7575
for your schema. This is probably not used a lot but it might be useful in
@@ -91,7 +91,7 @@ class Query:
9191
Here we configure a Query where requesting the `name` field will return
9292
`&quot;Patrick&quot;` through the custom root value.
9393

94-
## process_result
94+
### process_result
9595

9696
By overriding `GraphQLView.process_result` you can customize and/or process
9797
results before they are sent to a client. This can be useful for logging errors,
@@ -120,7 +120,7 @@ class MyGraphQLView(GraphQLView):
120120
In this case we are doing the default processing of the result, but it can be
121121
tweaked based on your needs.
122122

123-
## encode_json
123+
### encode_json
124124

125125
`encode_json` allows to customize the encoding of the JSON response. By default
126126
we use `json.dumps` but you can override this method to use a different encoder.

0 commit comments

Comments
 (0)