Skip to content

[RFC] Make operation name optional. #99

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

Merged
merged 1 commit into from
Oct 1, 2015
Merged

[RFC] Make operation name optional. #99

merged 1 commit into from
Oct 1, 2015

Conversation

leebyron
Copy link
Collaborator

@leebyron leebyron commented Oct 1, 2015

Based on feedback from those using GraphQL and inspired by RelayQL's syntax, this makes operation names optional.

The primary value is the ability to express mutations (or eventually subscriptions) without being required to provide a name if the name adds no value for your use case. (Value typically being query disambiguation and logging). Systems which want to enforce a name for queries should have a separate linting/validation rule - such a rule would probably also want to ban "query shorthand"

Based on feedback from those using GraphQL and inspired by RelayQL's syntax, this makes operation names optional.

The primary value is the ability to express mutations (or eventually subscriptions) without being required to provide a name if the name adds no value for your use case. (Value typically being query disambiguation and logging). Systems which want to enforce a name for queries should have a separate linting/validation rule - such a rule would probably also want to ban "query shorthand"
@dschafer
Copy link
Contributor

dschafer commented Oct 1, 2015

I like it. Ship it.

leebyron added a commit to graphql/graphql-js that referenced this pull request Oct 1, 2015
leebyron added a commit that referenced this pull request Oct 1, 2015
[RFC] Make operation name optional.
@leebyron leebyron merged commit d81fd1e into master Oct 1, 2015
@leebyron leebyron deleted the optional-op-name branch October 1, 2015 22:40
leebyron added a commit to graphql/graphql-js that referenced this pull request Oct 1, 2015
swolchok added a commit to graphql/libgraphqlparser that referenced this pull request Oct 1, 2015
jhgg added a commit to graphql-python/graphql-core-legacy that referenced this pull request Oct 6, 2015
sogko added a commit to sogko/graphql that referenced this pull request Mar 8, 2016
Parents: 2cfbfcec58
Author: Lee Byron <lee@leebyron.com>
Date: 2 October 2015 at 6:37:42 AM SGT
Commit Date: 2 October 2015 at 6:44:20 AM SGT

[RFC] Make operation name optional.

Implements graphql/graphql-spec#99
mattstern31 pushed a commit to mattstern31/graphql-gqllero-repository that referenced this pull request Nov 10, 2022
Parents: 2cfbfcec58
Author: Lee Byron <lee@leebyron.com>
Date: 2 October 2015 at 6:37:42 AM SGT
Commit Date: 2 October 2015 at 6:44:20 AM SGT

[RFC] Make operation name optional.

Implements graphql/graphql-spec#99
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.

3 participants