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

Incremental delivery support #638

Open
upcFrost opened this issue Oct 13, 2023 · 0 comments
Open

Incremental delivery support #638

upcFrost opened this issue Oct 13, 2023 · 0 comments

Comments

@upcFrost
Copy link

Hi,

Are there any plans of implementing the incremental delivery (graphql/graphql-spec#742)?
I've spotted that some big frameworks like Apollo started implementing it based on the current draft, so i guess they don't expect it to change that much (https://www.apollographql.com/docs/apollo-server/workflow/requests/#incremental-delivery-experimental).

On the code level, for @stream I guess implementing it would mean turning every resolver into an async generator (in most cases with a single element unless the @stream directive is passed), merging subscription and query field resolution logic together, and leaving the stream pagination logic itself to the resolver.

For @defer, I think it can be implemented by scheduling some of the fields with asyncio.as_completed, gathering and delivering the main output, and then iterating over the rest of the tasks.

I was thinking about implementing these two directives myself, but I'm not 100% sure I'll have enough time in the near future.

Best regards,
Petr

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

No branches or pull requests

1 participant