You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -47,6 +47,7 @@ def init_graphql(app, loop):
47
47
-`jinja_env`: Sets jinja environment to be used to process GraphiQL template. If Jinja’s async mode is enabled (by `enable_async=True`), uses
48
48
`Template.render_async` instead of `Template.render`. If environment is not set, fallbacks to simple regex-based renderer.
49
49
-`batch`: Set the GraphQL view as batch (for using in [Apollo-Client] or [ReactRelayNetworkLayer])
50
+
-`cors`: If `True`, set basic CORS headers in response to CORS preflight requests, otherwise - don't set any CORS headers (It's recommended to use [Sanic-CORS] extension).
50
51
51
52
You can also subclass `GraphQLView` and overwrite `get_root_value(self, request)` to have a dynamic root value per request.
52
53
@@ -73,4 +74,5 @@ This project is licensed under MIT License.
0 commit comments