Skip to content

docs: add docs on integration with Graphene v3 #104

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/aiohttp.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ gql_view(request) # <-- the instance is callable and expects a `aiohttp.web.Req

### Supported options for GraphQLView

* `schema`: The `GraphQLSchema` object that you want the view to execute when it gets a valid request.
* `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.
* `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`.
* `root_value`: The `root_value` you want to provide to graphql `execute`.
* `pretty`: Whether or not you want the response to be pretty printed JSON.
Expand Down
9 changes: 1 addition & 8 deletions docs/flask.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,9 @@ if __name__ == '__main__':

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

### Special Note for Graphene v3

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.

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).


### Supported options for GraphQLView

* `schema`: The `GraphQLSchema` object that you want the view to execute when it gets a valid request.
* `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.
* `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`.
* `root_value`: The `root_value` you want to provide to graphql `execute`.
* `pretty`: Whether or not you want the response to be pretty printed JSON.
Expand Down
2 changes: 1 addition & 1 deletion docs/sanic.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ This will add `/graphql` endpoint to your app and enable the GraphiQL IDE.

### Supported options for GraphQLView

* `schema`: The `GraphQLSchema` object that you want the view to execute when it gets a valid request.
* `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.
* `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`.
* `root_value`: The `root_value` you want to provide to graphql `execute`.
* `pretty`: Whether or not you want the response to be pretty printed JSON.
Expand Down
2 changes: 1 addition & 1 deletion docs/webob.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ This will add `/graphql` endpoint to your app and enable the GraphiQL IDE.

### Supported options for GraphQLView

* `schema`: The `GraphQLSchema` object that you want the view to execute when it gets a valid request.
* `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.
* `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`.
* `root_value`: The `root_value` you want to provide to graphql `execute`.
* `pretty`: Whether or not you want the response to be pretty printed JSON.
Expand Down