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

Add defer and stream directives as extension #1134

Open
jasonkuhrt opened this issue Sep 26, 2024 · 0 comments
Open

Add defer and stream directives as extension #1134

jasonkuhrt opened this issue Sep 26, 2024 · 0 comments

Comments

@jasonkuhrt
Copy link
Owner

jasonkuhrt commented Sep 26, 2024

Perceived Problem

Right now defer and stream are hardcoded types of directives. In fact though at least Yoga still does not support them out of the box citing their being experimental.

This is a problem for Graffle since it suggests these directives are available when they may not be.

https://the-guild.dev/graphql/yoga-server/docs/features/defer-stream

Defer and stream are forthcoming directives to be standardized in the coming year or two.

Make them available to Graffle users.

Ideas / Proposed Solution(s)

  • Make it possible to add directives via extensions
  • Make defer and stream extensions
  • Let users opt into them
  • These directives can only appear on inline and spread fragments, a further restriction to factor into the extension system
  • When these directives are used anyware in the selection set then:
    • static type return value must become asynchronous iterator
    • any labels used should be statically realized on the return type incrementally delivered items
    • runtime must also become an asynchronous iterator too of course
    • internal unpack hook needs to not assume json response
@jasonkuhrt jasonkuhrt changed the title Do not assume defer and stream Add defer and stream directives as extension Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant