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

enhance(ResolveFieldValue): add async collection language #1066

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yaacovCR
Copy link
Contributor

@yaacovCR yaacovCR commented Dec 7, 2023

and some baseline collection language for comparison

extracted from #742

Copy link

netlify bot commented Dec 7, 2023

Deploy Preview for graphql-spec-draft ready!

Name Link
🔨 Latest commit 29e112c
🔍 Latest deploy log https://app.netlify.com/sites/graphql-spec-draft/deploys/6571a3d8eee1d800085d28fb
😎 Deploy Preview https://deploy-preview-1066--graphql-spec-draft.netlify.app/draft
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@yaacovCR
Copy link
Contributor Author

yaacovCR commented Dec 7, 2023

@graphql/tsc -- I think this could count as an editorial change? It is currently implemented within graphql-js on main as part of the incremental delivery alpha/beta, has not been released...

benjie
benjie previously requested changes Dec 7, 2023
Copy link
Member

@benjie benjie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please restore the paragraph breaks which will both minimise the diff and restore the formatting of the note (which has special handling in spec-md).

and some baseline collection language for comparison

extracted from graphql#742

Authored-by: Rob Richard <rob@1stdibs.com>
@yaacovCR
Copy link
Contributor Author

yaacovCR commented Dec 7, 2023

Please restore the paragraph breaks which will both minimise the diff and restore the formatting of the note (which has special handling in spec-md).

Done, thanks!

Comment on lines +669 to +670
flow. In addition, an implementation for collections may leverage asynchronous
iterators or asynchronous generators provided by many programming languages.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would introduce the term "generator" and "iterator" to the spec, which isn't currently used. Let's keep the language simpler:

Suggested change
flow. In addition, an implementation for collections may leverage asynchronous
iterators or asynchronous generators provided by many programming languages.
flow. In addition, for fields that have a return type that is a List type, each
value in a collection of values returned by {resolver} may itself be
asynchronous.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about something very similar:

Suggested change
flow. In addition, an implementation for collections may leverage asynchronous
iterators or asynchronous generators provided by many programming languages.
flow. In addition, for fields that have a return type that is a List type, each
value in a collection of values returned by {resolver} may be
retrieved asynchronously.

This just avoids saying that the value itself is asynchronous, which I think you might mean to just be a more concise version of the above?

@robrichard may have input, this was extracted from #742

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

Successfully merging this pull request may close these issues.

None yet

2 participants