@@ -86,6 +86,37 @@ public typealias SubscriptionEventStream = EventStream<Future<GraphQLResult>>
86
86
/// an error occurs only in a specific field. If that happens the value of that field will be `null`
87
87
/// and there will be an error inside `errors` specifying the reason for the failure and the path of
88
88
/// the failed field.
89
+ public func graphql(
90
+ schema: GraphQLSchema ,
91
+ request: String ,
92
+ rootValue: Any = ( ) ,
93
+ context: Any = ( ) ,
94
+ eventLoopGroup: EventLoopGroup ,
95
+ variableValues: [ String : Map ] = [ : ] ,
96
+ operationName: String ? = nil ,
97
+ validationRules: [ ( ValidationContext ) -> Visitor ] = [ ]
98
+ ) throws -> Future < GraphQLResult > {
99
+ return try graphql (
100
+ queryStrategy: ConcurrentFieldExecutionStrategy ( ) ,
101
+ mutationStrategy: SerialFieldExecutionStrategy ( ) ,
102
+ subscriptionStrategy: ConcurrentFieldExecutionStrategy ( ) ,
103
+ instrumentation: NoOpInstrumentation,
104
+ validationRules: validationRules,
105
+ schema: schema,
106
+ request: request,
107
+ rootValue: rootValue,
108
+ context: context,
109
+ eventLoopGroup: eventLoopGroup,
110
+ variableValues: variableValues,
111
+ operationName: operationName
112
+ )
113
+ }
114
+
115
+ @available (
116
+ * ,
117
+ deprecated,
118
+ message: " Specifying exeuction strategies and instrumentation will be removed in a future version. "
119
+ )
89
120
public func graphql(
90
121
queryStrategy: QueryFieldExecutionStrategy = ConcurrentFieldExecutionStrategy ( ) ,
91
122
mutationStrategy: MutationFieldExecutionStrategy = SerialFieldExecutionStrategy ( ) ,
@@ -155,6 +186,35 @@ public func graphql(
155
186
/// an error occurs only in a specific field. If that happens the value of that field will be `null`
156
187
/// and there will be an error inside `errors` specifying the reason for the failure and the path of
157
188
/// the failed field.
189
+ public func graphql< Retrieval: PersistedQueryRetrieval > (
190
+ queryRetrieval: Retrieval ,
191
+ queryId: Retrieval . Id ,
192
+ rootValue: Any = ( ) ,
193
+ context: Any = ( ) ,
194
+ eventLoopGroup: EventLoopGroup ,
195
+ variableValues: [ String : Map ] = [ : ] ,
196
+ operationName: String ? = nil
197
+ ) throws -> Future < GraphQLResult > {
198
+ return try graphql (
199
+ queryStrategy: ConcurrentFieldExecutionStrategy ( ) ,
200
+ mutationStrategy: SerialFieldExecutionStrategy ( ) ,
201
+ subscriptionStrategy: ConcurrentFieldExecutionStrategy ( ) ,
202
+ instrumentation: NoOpInstrumentation,
203
+ queryRetrieval: queryRetrieval,
204
+ queryId: queryId,
205
+ rootValue: rootValue,
206
+ context: context,
207
+ eventLoopGroup: eventLoopGroup,
208
+ variableValues: variableValues,
209
+ operationName: operationName
210
+ )
211
+ }
212
+
213
+ @available (
214
+ * ,
215
+ deprecated,
216
+ message: " Specifying exeuction strategies and instrumentation will be removed in a future version. "
217
+ )
158
218
public func graphql< Retrieval: PersistedQueryRetrieval > (
159
219
queryStrategy: QueryFieldExecutionStrategy = ConcurrentFieldExecutionStrategy ( ) ,
160
220
mutationStrategy: MutationFieldExecutionStrategy = SerialFieldExecutionStrategy ( ) ,
@@ -229,6 +289,37 @@ public func graphql<Retrieval: PersistedQueryRetrieval>(
229
289
/// that happens the value of that field will be `null` and there
230
290
/// will be an error inside `errors` specifying the reason for the failure and the path of the
231
291
/// failed field.
292
+ public func graphqlSubscribe(
293
+ schema: GraphQLSchema ,
294
+ request: String ,
295
+ rootValue: Any = ( ) ,
296
+ context: Any = ( ) ,
297
+ eventLoopGroup: EventLoopGroup ,
298
+ variableValues: [ String : Map ] = [ : ] ,
299
+ operationName: String ? = nil ,
300
+ validationRules: [ ( ValidationContext ) -> Visitor ] = [ ]
301
+ ) throws -> Future < SubscriptionResult > {
302
+ return try graphqlSubscribe (
303
+ queryStrategy: ConcurrentFieldExecutionStrategy ( ) ,
304
+ mutationStrategy: SerialFieldExecutionStrategy ( ) ,
305
+ subscriptionStrategy: ConcurrentFieldExecutionStrategy ( ) ,
306
+ instrumentation: NoOpInstrumentation,
307
+ validationRules: validationRules,
308
+ schema: schema,
309
+ request: request,
310
+ rootValue: rootValue,
311
+ context: context,
312
+ eventLoopGroup: eventLoopGroup,
313
+ variableValues: variableValues,
314
+ operationName: operationName
315
+ )
316
+ }
317
+
318
+ @available (
319
+ * ,
320
+ deprecated,
321
+ message: " Specifying exeuction strategies and instrumentation will be removed in a future version. "
322
+ )
232
323
public func graphqlSubscribe(
233
324
queryStrategy: QueryFieldExecutionStrategy = ConcurrentFieldExecutionStrategy ( ) ,
234
325
mutationStrategy: MutationFieldExecutionStrategy = SerialFieldExecutionStrategy ( ) ,
@@ -310,6 +401,32 @@ public func graphqlSubscribe(
310
401
/// field will be `null` and there will be an error inside `errors` specifying the reason for
311
402
/// the failure and the path of the failed field.
312
403
@available ( macOS 10 . 15 , iOS 15 , watchOS 8 , tvOS 15 , * )
404
+ public func graphql(
405
+ schema: GraphQLSchema ,
406
+ request: String ,
407
+ rootValue: Any = ( ) ,
408
+ context: Any = ( ) ,
409
+ eventLoopGroup: EventLoopGroup ,
410
+ variableValues: [ String : Map ] = [ : ] ,
411
+ operationName: String ? = nil
412
+ ) async throws -> GraphQLResult {
413
+ return try await graphql (
414
+ schema: schema,
415
+ request: request,
416
+ rootValue: rootValue,
417
+ context: context,
418
+ eventLoopGroup: eventLoopGroup,
419
+ variableValues: variableValues,
420
+ operationName: operationName
421
+ ) . get ( )
422
+ }
423
+
424
+ @available ( macOS 10 . 15 , iOS 15 , watchOS 8 , tvOS 15 , * )
425
+ @available (
426
+ * ,
427
+ deprecated,
428
+ message: " Specifying exeuction strategies and instrumentation will be removed in a future version. "
429
+ )
313
430
public func graphql(
314
431
queryStrategy: QueryFieldExecutionStrategy = ConcurrentFieldExecutionStrategy ( ) ,
315
432
mutationStrategy: MutationFieldExecutionStrategy = SerialFieldExecutionStrategy ( ) ,
@@ -377,6 +494,32 @@ public func graphql(
377
494
/// will be an error inside `errors` specifying the reason for the failure and the path of the
378
495
/// failed field.
379
496
@available ( macOS 10 . 15 , iOS 15 , watchOS 8 , tvOS 15 , * )
497
+ public func graphqlSubscribe(
498
+ schema: GraphQLSchema ,
499
+ request: String ,
500
+ rootValue: Any = ( ) ,
501
+ context: Any = ( ) ,
502
+ eventLoopGroup: EventLoopGroup ,
503
+ variableValues: [ String : Map ] = [ : ] ,
504
+ operationName: String ? = nil
505
+ ) async throws -> SubscriptionResult {
506
+ return try await graphqlSubscribe (
507
+ schema: schema,
508
+ request: request,
509
+ rootValue: rootValue,
510
+ context: context,
511
+ eventLoopGroup: eventLoopGroup,
512
+ variableValues: variableValues,
513
+ operationName: operationName
514
+ ) . get ( )
515
+ }
516
+
517
+ @available ( macOS 10 . 15 , iOS 15 , watchOS 8 , tvOS 15 , * )
518
+ @available (
519
+ * ,
520
+ deprecated,
521
+ message: " Specifying exeuction strategies and instrumentation will be removed in a future version. "
522
+ )
380
523
public func graphqlSubscribe(
381
524
queryStrategy: QueryFieldExecutionStrategy = ConcurrentFieldExecutionStrategy ( ) ,
382
525
mutationStrategy: MutationFieldExecutionStrategy = SerialFieldExecutionStrategy ( ) ,
0 commit comments