@@ -80,82 +80,78 @@ public extension API {
8080 }
8181}
8282
83- #if compiler(>=5.5) && canImport(_Concurrency)
84-
85- public extension API {
86- @available ( macOS 10 . 15 , iOS 15 , watchOS 8 , tvOS 15 , * )
87- func execute(
88- request: String ,
89- context: ContextType ,
90- on eventLoopGroup: EventLoopGroup ,
91- variables: [ String : Map ] = [ : ] ,
92- operationName: String ? = nil ,
93- validationRules: [ ( ValidationContext ) -> Visitor ] = [ ]
94- ) async throws -> GraphQLResult {
95- return try await schema. execute (
96- request: request,
97- resolver: resolver,
98- context: context,
99- eventLoopGroup: eventLoopGroup,
100- variables: variables,
101- operationName: operationName,
102- validationRules: validationRules
103- ) . get ( )
104- }
105-
106- @available ( macOS 10 . 15 , iOS 15 , watchOS 8 , tvOS 15 , * )
107- func execute(
108- request: GraphQLRequest ,
109- context: ContextType ,
110- on eventLoopGroup: EventLoopGroup ,
111- validationRules: [ ( ValidationContext ) -> Visitor ] = [ ]
112- ) async throws -> GraphQLResult {
113- return try await execute (
114- request: request. query,
115- context: context,
116- on: eventLoopGroup,
117- variables: request. variables,
118- operationName: request. operationName,
119- validationRules: validationRules
120- )
121- }
83+ public extension API {
84+ @available ( macOS 10 . 15 , iOS 15 , watchOS 8 , tvOS 15 , * )
85+ func execute(
86+ request: String ,
87+ context: ContextType ,
88+ on eventLoopGroup: EventLoopGroup ,
89+ variables: [ String : Map ] = [ : ] ,
90+ operationName: String ? = nil ,
91+ validationRules: [ ( ValidationContext ) -> Visitor ] = [ ]
92+ ) async throws -> GraphQLResult {
93+ return try await schema. execute (
94+ request: request,
95+ resolver: resolver,
96+ context: context,
97+ eventLoopGroup: eventLoopGroup,
98+ variables: variables,
99+ operationName: operationName,
100+ validationRules: validationRules
101+ ) . get ( )
102+ }
122103
123- @available ( macOS 10 . 15 , iOS 15 , watchOS 8 , tvOS 15 , * )
124- func subscribe(
125- request: String ,
126- context: ContextType ,
127- on eventLoopGroup: EventLoopGroup ,
128- variables: [ String : Map ] = [ : ] ,
129- operationName: String ? = nil ,
130- validationRules: [ ( ValidationContext ) -> Visitor ] = [ ]
131- ) async throws -> SubscriptionResult {
132- return try await schema. subscribe (
133- request: request,
134- resolver: resolver,
135- context: context,
136- eventLoopGroup: eventLoopGroup,
137- variables: variables,
138- operationName: operationName,
139- validationRules: validationRules
140- ) . get ( )
141- }
104+ @available ( macOS 10 . 15 , iOS 15 , watchOS 8 , tvOS 15 , * )
105+ func execute(
106+ request: GraphQLRequest ,
107+ context: ContextType ,
108+ on eventLoopGroup: EventLoopGroup ,
109+ validationRules: [ ( ValidationContext ) -> Visitor ] = [ ]
110+ ) async throws -> GraphQLResult {
111+ return try await execute (
112+ request: request. query,
113+ context: context,
114+ on: eventLoopGroup,
115+ variables: request. variables,
116+ operationName: request. operationName,
117+ validationRules: validationRules
118+ )
119+ }
142120
143- @available ( macOS 10 . 15 , iOS 15 , watchOS 8 , tvOS 15 , * )
144- func subscribe(
145- request: GraphQLRequest ,
146- context: ContextType ,
147- on eventLoopGroup: EventLoopGroup ,
148- validationRules: [ ( ValidationContext ) -> Visitor ] = [ ]
149- ) async throws -> SubscriptionResult {
150- return try await subscribe (
151- request: request. query,
152- context: context,
153- on: eventLoopGroup,
154- variables: request. variables,
155- operationName: request. operationName,
156- validationRules: validationRules
157- )
158- }
121+ @available ( macOS 10 . 15 , iOS 15 , watchOS 8 , tvOS 15 , * )
122+ func subscribe(
123+ request: String ,
124+ context: ContextType ,
125+ on eventLoopGroup: EventLoopGroup ,
126+ variables: [ String : Map ] = [ : ] ,
127+ operationName: String ? = nil ,
128+ validationRules: [ ( ValidationContext ) -> Visitor ] = [ ]
129+ ) async throws -> SubscriptionResult {
130+ return try await schema. subscribe (
131+ request: request,
132+ resolver: resolver,
133+ context: context,
134+ eventLoopGroup: eventLoopGroup,
135+ variables: variables,
136+ operationName: operationName,
137+ validationRules: validationRules
138+ ) . get ( )
159139 }
160140
161- #endif
141+ @available ( macOS 10 . 15 , iOS 15 , watchOS 8 , tvOS 15 , * )
142+ func subscribe(
143+ request: GraphQLRequest ,
144+ context: ContextType ,
145+ on eventLoopGroup: EventLoopGroup ,
146+ validationRules: [ ( ValidationContext ) -> Visitor ] = [ ]
147+ ) async throws -> SubscriptionResult {
148+ return try await subscribe (
149+ request: request. query,
150+ context: context,
151+ on: eventLoopGroup,
152+ variables: request. variables,
153+ operationName: request. operationName,
154+ validationRules: validationRules
155+ )
156+ }
157+ }
0 commit comments