File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -42,11 +42,11 @@ when creating your GraphQL schema use [Graphiti](https://github.com/GraphQLSwift
4242Once a schema has been defined queries may be executed against it using the global ` graphql ` function:
4343
4444``` swift
45- let result = try graphql (
45+ let result = try await graphql (
4646 schema : schema,
4747 request : " { hello }" ,
4848 eventLoopGroup : eventLoopGroup
49- ). wait ()
49+ )
5050```
5151
5252The result of this query is a ` GraphQLResult ` that encodes to the following JSON:
@@ -94,9 +94,9 @@ let schema = try GraphQLSchema(
9494To execute a subscription use the ` graphqlSubscribe ` function:
9595
9696``` swift
97- let subscriptionResult = try graphqlSubscribe (
97+ let subscriptionResult = try await graphqlSubscribe (
9898 schema : schema,
99- ). wait ()
99+ )
100100// Must downcast from EventStream to concrete type to use in 'for await' loop below
101101let concurrentStream = subscriptionResult.stream ! as! ConcurrentEventStream
102102for try await result in concurrentStream.stream {
You can’t perform that action at this time.
0 commit comments