Repository navigation
fix: Fixes Could not find a resolve function runtime error when returning Union types - #22
Conversation
c9581e7 to
df87d82
Compare
GNMoseke
left a comment
There was a problem hiding this comment.
This one is kind magic but IIUC:
when generating the actual swift source for the GraphQLObjectType, you must override the isTypeOf closure to match on the procotol for the union types rather than trying to match on a concrete, since the actual resolver definition only deals in the protocol?
@GNMoseke Yeah, GraphQL's Union type resolution happens here, where it finds the first conforming types whose It was a bug in this package that we didn't populate |
This fixes an issue where, when a Union was returned, the underlying GraphQL executor couldn't find the concrete type (and therefore concrete type resolver), resulting in a runtime `Could not find a resolve function` error. Depends on GraphQLSwift/GraphQL#189
This is a recreator for the "Could not find a resolve function" issue.
df87d82 to
e7c6382
Compare
This fixes an issue where, when a Union was returned, the underlying GraphQL executor couldn't find the concrete type (and therefore concrete type resolver), resulting in a runtime
Could not find a resolve functionerror. Depends on GraphQLSwift/GraphQL#189