Skip to content

Executing and publishing results of a subscription #4

Description

@oojacoboo

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!

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions