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 @experimental #944

Closed
wants to merge 4 commits into from
Closed

Conversation

martinbonnin
Copy link
Contributor

Pull request for #943

@netlify
Copy link

netlify bot commented May 5, 2022

Deploy Preview for graphql-spec-draft ready!

Name Link
🔨 Latest commit 4291955
🔍 Latest deploy log https://app.netlify.com/sites/graphql-spec-draft/deploys/627414423f3d4a0008d03ad9
😎 Deploy Preview https://deploy-preview-944--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 settings.

### @experimental

```graphql
directive @experimental on FIELD_DEFINITION | ENUM_VALUE
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be really useful to support @experimental on argument definitions and input field definitions too.

Copy link
Contributor Author

@martinbonnin martinbonnin May 5, 2022

Choose a reason for hiding this comment

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

Do you have a use case in mind? I mainly copy/pasted the @deprecated definition cause I liked the symmetry there. Is there any reason to allow arguments and input fields to be @experimental but not @deprecated?

Copy link
Contributor

Choose a reason for hiding this comment

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

We (Salsify) support lots of equality filtering on fields in our GraphQL API e.g. retrieve a list of products in a certain category. We're experimenting with also supporting more complex filtering via more advanced operators like and, or, not, <, etc. These additional inputs are very much experimental and we don't yet want to commit to maintaining backwards compatibility but we do want clients trying them out and giving us feedback on the API ergonomics. It would be great to mark the advanced filtering field arguments and input fields as @experimental.

It looks like #805 hasn't actually merged yet but the RFC for adding @deprecated to input fields/field arguments seems to have been approved so hopefully this would be symmetrical soon enough.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the context! Symmetry is always good 🤗 . I just pushed changes to add arguments and input fields.

@martinbonnin
Copy link
Contributor Author

Closing in favor of graphql/graphql-wg#1006

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.

2 participants