Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Executing and publishing results of a subscription #4

Open
oojacoboo opened this issue Jan 18, 2024 · 0 comments
Open

Executing and publishing results of a subscription #4

oojacoboo opened this issue Jan 18, 2024 · 0 comments

Comments

@oojacoboo
Copy link

oojacoboo commented Jan 18, 2024

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant