forked from shurcooL/graphql
-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/jsonutil: support directives directly after name
Also consider "@" when looking for the end of the field name, since GraphQL directives can follow a field name immediately without any arguments or aliases being involved. For example: query { me { firstName lastName @include(if: $expandedInfo) } } The strings.Index check for "@" is the third separator we look for. There's no reason to look separately, since we just want the first field name separator. Add test covering a GraphQL directive that immediately follows the field name. Co-authored-by: Dmitri Shuralyov <dmitri@shuralyov.com> GitHub-Pull-Request: shurcooL#94
- Loading branch information
Showing
2 changed files
with
37 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters