@@ -52,29 +52,29 @@ public class SubscriptionField<ObjectType, Context, FieldType, Arguments : Decod
5252 asyncSubscribe: @escaping AsyncResolve < ObjectType , Context , Arguments , EventStream < Any > >
5353 ) {
5454 let resolve : GraphQLFieldResolve = { source, arguments, context, eventLoopGroup, _ in
55- guard let source = source as? SourceEventType else {
55+ guard let _source = source as? SourceEventType else {
5656 throw GraphQLError ( message: " Expected source type \( ObjectType . self) but got \( type ( of: source) ) " )
5757 }
5858
59- guard let context = context as? Context else {
59+ guard let _context = context as? Context else {
6060 throw GraphQLError ( message: " Expected context type \( Context . self) but got \( type ( of: context) ) " )
6161 }
6262
6363 let args = try MapDecoder ( ) . decode ( Arguments . self, from: arguments)
64- return try asyncResolve ( source ) ( context , args, eventLoopGroup) . map ( { $0 } )
64+ return try asyncResolve ( _source ) ( _context , args, eventLoopGroup) . map ( { $0 } )
6565 }
6666
6767 let subscribe : GraphQLFieldResolve = { source, arguments, context, eventLoopGroup, _ in
68- guard let source = source as? ObjectType else {
68+ guard let _source = source as? ObjectType else {
6969 throw GraphQLError ( message: " Expected source type \( ObjectType . self) but got \( type ( of: source) ) " )
7070 }
7171
72- guard let context = context as? Context else {
72+ guard let _context = context as? Context else {
7373 throw GraphQLError ( message: " Expected context type \( Context . self) but got \( type ( of: context) ) " )
7474 }
7575
7676 let args = try MapDecoder ( ) . decode ( Arguments . self, from: arguments)
77- return try asyncSubscribe ( source ) ( context , args, eventLoopGroup) . map ( { $0 } )
77+ return try asyncSubscribe ( _source ) ( _context , args, eventLoopGroup) . map ( { $0 } )
7878 }
7979 self . init ( name: name, arguments: arguments, resolve: resolve, subscribe: subscribe)
8080 }
@@ -86,24 +86,24 @@ public class SubscriptionField<ObjectType, Context, FieldType, Arguments : Decod
8686 asyncSubscribe: @escaping AsyncResolve < ObjectType , Context , Arguments , EventStream < Any > >
8787 ) {
8888 let resolve : GraphQLFieldResolve = { source, _, context, eventLoopGroup, _ in
89- guard let source = source as? FieldType else {
89+ guard let _source = source as? FieldType else {
9090 throw GraphQLError ( message: " Expected source type \( FieldType . self) but got \( type ( of: source) ) " )
9191 }
9292
93- return eventLoopGroup. next ( ) . makeSucceededFuture ( source )
93+ return eventLoopGroup. next ( ) . makeSucceededFuture ( _source )
9494 }
9595
9696 let subscribe : GraphQLFieldResolve = { source, arguments, context, eventLoopGroup, _ in
97- guard let source = source as? ObjectType else {
97+ guard let _source = source as? ObjectType else {
9898 throw GraphQLError ( message: " Expected source type \( ObjectType . self) but got \( type ( of: source) ) " )
9999 }
100100
101- guard let context = context as? Context else {
101+ guard let _context = context as? Context else {
102102 throw GraphQLError ( message: " Expected context type \( Context . self) but got \( type ( of: context) ) " )
103103 }
104104
105105 let args = try MapDecoder ( ) . decode ( Arguments . self, from: arguments)
106- return try asyncSubscribe ( source ) ( context , args, eventLoopGroup) . map ( { $0 } )
106+ return try asyncSubscribe ( _source ) ( _context , args, eventLoopGroup) . map ( { $0 } )
107107 }
108108 self . init ( name: name, arguments: arguments, resolve: resolve, subscribe: subscribe)
109109 }
0 commit comments