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

Incorrect example in write-your-plugin #2063

Merged
merged 1 commit into from
Jun 26, 2019
Merged

Incorrect example in write-your-plugin #2063

merged 1 commit into from
Jun 26, 2019

Conversation

DylanRJohnston
Copy link
Contributor

In the description just above you state that documents is an array of type { filePath: string, content: DocumentNode } but then in the subsequent example definitions is accessed directly instead of first via content.

In the description just above you state that documents is an array of type `{ filePath: string, content: DocumentNode }` but then in the subsequent example `definitions` is accessed directly instead of first via `content`.
@DylanRJohnston
Copy link
Contributor Author

Also worth noting that on OperationDefinition name can be undefined and on SchemaDefinition and SchemaExtension name is not present at all meaning the example will crash at runtime.

@dotansimha
Copy link
Owner

Thank you!
The codegen core warn when there is an unnamed operation (and also for duplicates).

@dotansimha dotansimha merged commit 1b7664b into dotansimha:master Jun 26, 2019
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