Hey, I'm a maintainer for GraphQLite, which is also written on top of webonyx. I'm currently taking a look at a subscription implementation and running into the challenge of how to execute the return value for a subscription.
I was looking over your code and example, and you've left out that very important bit. I was wondering if you could please shed some light on how you addressed this concern.
The issue, of course, is that you need to resolve a type based on the original subscription's defined output fields. I see where you're using value objects to store the necessary components of the subscription request/AST, which is needed, naturally. However, when executing the return result from these "components", that's where an implementation isn't clear. It seems you need to actually execute a query/root field using the resolvers with webonyx, or write another custom resolver, internally, that will traverse the graph and generate the return value/JSON.
Any insight and examples/references you have on this would be helpful. Cheers!
Hey, I'm a maintainer for GraphQLite, which is also written on top of webonyx. I'm currently taking a look at a subscription implementation and running into the challenge of how to execute the return value for a subscription.
I was looking over your code and example, and you've left out that very important bit. I was wondering if you could please shed some light on how you addressed this concern.
The issue, of course, is that you need to resolve a type based on the original subscription's defined output fields. I see where you're using value objects to store the necessary components of the subscription request/AST, which is needed, naturally. However, when executing the return result from these "components", that's where an implementation isn't clear. It seems you need to actually execute a query/root field using the resolvers with webonyx, or write another custom resolver, internally, that will traverse the graph and generate the return value/JSON.
Any insight and examples/references you have on this would be helpful. Cheers!