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

Defer and stream directives #36

Open
Ericnr opened this issue Mar 7, 2021 · 3 comments
Open

Defer and stream directives #36

Ericnr opened this issue Mar 7, 2021 · 3 comments

Comments

@Ericnr
Copy link

Ericnr commented Mar 7, 2021

Is it planned to support these directives?

@hoangvvo
Copy link
Owner

hoangvvo commented Mar 8, 2021

benzene relies on graphql-jit which currently does not support those directives. So there needs to be a PR to implement it there.

Another option would be to add a way to fallback to graphql-js (which already has it under experiment branch I think?) for queries with defer and stream. This way we can still take advantage of the performance for non-stream queries while supporting defer+stream directives (or any future directives that graphql-jit do not support for the time being)

@hoangvvo
Copy link
Owner

hoangvvo commented Mar 8, 2021

I have not look at graphql-js implementation in detail but they might be similar to the use of async interator in graphql subscription, which is being implemented in this PR. If that is the case, it might not be too hard to implement it also in graphql-js after merging the mentioned subscription implementation

@Ericnr
Copy link
Author

Ericnr commented Mar 8, 2021

Cool! Feel free to close this issue or use it to track the development of these directives

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

2 participants