File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change
1
+ Subscriptions
2
+ -------------
3
+
4
+ Sometimes you need to not only query data from a server, but you also want
5
+ to push data from the server to the client. GraphQL-core-next has you also
6
+ covered here, because it implements the "Subscribe" algorithm described in
7
+ the GraphQL spec. To execute a GraphQL subscription, you must use the
8
+ :func: `graphql.subscribe ` method from the :mod: `graphql.subscription ` module.
9
+ Instead of a single ``ExecutionResult ``, this function returns an asynchronous
10
+ iterator yielding a stream of those, unless there was an immediate error.
11
+ Of course you will then also need to maintain a persistent channel to the
12
+ client (often realized via WebSockets) to push these results back.
13
+
14
+
1
15
Other Usages
2
16
------------
3
17
You can’t perform that action at this time.
0 commit comments