Allow leading pipe in directive SDL, and add leading union pipe tests #2650
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #2649
Represented as |opt in the GraphQL specification
Link to union tests in graphql-js: https://github.com/graphql/graphql-js/blob/3ab82f4981970f50dd3a96e22a11839e4ec5bb7b/src/language/__tests__/schema-parser-test.ts#L892-L962
Spec blame: https://github.com/graphql/graphql-spec/blame/c18590c477d6817d73e19b6c248c9fcc62b03017/spec/Appendix%20B%20--%20Grammar%20Summary.md#L327
graphql-js does not seem to provide directive tests for this specific circumstance (I should really open a PR over there)