Skip to content

Commit 8829c09

Browse files
authored
docs: add docs on integration with Graphene v3 (#104)
1 parent 1972b27 commit 8829c09

File tree

4 files changed

+4
-11
lines changed

4 files changed

+4
-11
lines changed

docs/aiohttp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ gql_view(request) # <-- the instance is callable and expects a `aiohttp.web.Req
4747

4848
### Supported options for GraphQLView
4949

50-
* `schema`: The `GraphQLSchema` object that you want the view to execute when it gets a valid request.
50+
* `schema`: The GraphQL schema object that you want the view to execute when it gets a valid request. Accepts either an object of type `GraphQLSchema` from `graphql-core` or `Schema` from `graphene`. For Graphene v3, passing either `schema: graphene.Schema` or `schema.graphql_schema` is allowed.
5151
* `context`: A value to pass as the `context_value` to graphql `execute` function. By default is set to `dict` with request object at key `request`.
5252
* `root_value`: The `root_value` you want to provide to graphql `execute`.
5353
* `pretty`: Whether or not you want the response to be pretty printed JSON.

docs/flask.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,9 @@ if __name__ == '__main__':
3939

4040
This will add `/graphql` endpoint to your app and enable the GraphiQL IDE.
4141

42-
### Special Note for Graphene v3
43-
44-
If you are using the `Schema` type of [Graphene](https://github.com/graphql-python/graphene) library, be sure to use the `graphql_schema` attribute to pass as schema on the `GraphQLView` view. Otherwise, the `GraphQLSchema` from `graphql-core` is the way to go.
45-
46-
More info at [Graphene v3 release notes](https://github.com/graphql-python/graphene/wiki/v3-release-notes#graphene-schema-no-longer-subclasses-graphqlschema-type) and [GraphQL-core 3 usage](https://github.com/graphql-python/graphql-core#usage).
47-
48-
4942
### Supported options for GraphQLView
5043

51-
* `schema`: The `GraphQLSchema` object that you want the view to execute when it gets a valid request.
44+
* `schema`: The GraphQL schema object that you want the view to execute when it gets a valid request. Accepts either an object of type `GraphQLSchema` from `graphql-core` or `Schema` from `graphene`. For Graphene v3, passing either `schema: graphene.Schema` or `schema.graphql_schema` is allowed.
5245
* `context`: A value to pass as the `context_value` to graphql `execute` function. By default is set to `dict` with request object at key `request`.
5346
* `root_value`: The `root_value` you want to provide to graphql `execute`.
5447
* `pretty`: Whether or not you want the response to be pretty printed JSON.

docs/sanic.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ This will add `/graphql` endpoint to your app and enable the GraphiQL IDE.
3939

4040
### Supported options for GraphQLView
4141

42-
* `schema`: The `GraphQLSchema` object that you want the view to execute when it gets a valid request.
42+
* `schema`: The GraphQL schema object that you want the view to execute when it gets a valid request. Accepts either an object of type `GraphQLSchema` from `graphql-core` or `Schema` from `graphene`. For Graphene v3, passing either `schema: graphene.Schema` or `schema.graphql_schema` is allowed.
4343
* `context`: A value to pass as the `context_value` to graphql `execute` function. By default is set to `dict` with request object at key `request`.
4444
* `root_value`: The `root_value` you want to provide to graphql `execute`.
4545
* `pretty`: Whether or not you want the response to be pretty printed JSON.

docs/webob.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ This will add `/graphql` endpoint to your app and enable the GraphiQL IDE.
3838

3939
### Supported options for GraphQLView
4040

41-
* `schema`: The `GraphQLSchema` object that you want the view to execute when it gets a valid request.
41+
* `schema`: The GraphQL schema object that you want the view to execute when it gets a valid request. Accepts either an object of type `GraphQLSchema` from `graphql-core` or `Schema` from `graphene`. For Graphene v3, passing either `schema: graphene.Schema` or `schema.graphql_schema` is allowed.
4242
* `context`: A value to pass as the `context_value` to graphql `execute` function. By default is set to `dict` with request object at key `request`.
4343
* `root_value`: The `root_value` you want to provide to graphql `execute`.
4444
* `pretty`: Whether or not you want the response to be pretty printed JSON.

0 commit comments

Comments
 (0)