Skip to content

Conversation

@OlegIlyenko
Copy link
Contributor

No description provided.

@ghost ghost added the CLA Signed label Sep 11, 2016
{
"query": "...",
"variables": { variable1: value, ... }
"oprationName": "...",
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you're missing the e in operationName here and also above.

Also, I think it's worth mentioning that the operationName in the POST body is optional, and only required if you have multiple operations?

As an additional wrinkle, express-graphql doesn't support multiple operations in one document as far as I know.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OMG, sorry for the typo 😳

I was also thinking about adding a note about optional fields. In this case we need to mention that variables is optional as well. WDYT?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, maybe just add a sentence underneath the code snippet saying operationName and variables are optional.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Perfect. I already added it and rebased the PR

@OlegIlyenko OlegIlyenko changed the title Added oprationName Added operationName Sep 11, 2016
@ghost ghost added the CLA Signed label Sep 11, 2016
@ghost ghost added the CLA Signed label Sep 11, 2016
@stubailo
Copy link
Contributor

Just one last question - should we be worried that express-graphql doesn't support this feature?

@OlegIlyenko
Copy link
Contributor Author

Are you sure about this limitation? I just double checked the docs and looks like operationName is supported: https://github.com/graphql/express-graphql#http-usage

@stubailo
Copy link
Contributor

Oh, OK I'm totally wrong :]

@stubailo stubailo merged commit 42db63c into graphql:new-source Sep 11, 2016
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