-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add consideration for pointer false directive when optional: pointer …
…configuration option is used (#280) When support for the `optional` configuration parameter was added in #198 it was done in a way that, if `optional: pointer` was set, it would not consider the presence of `# @genqlient(pointer: false)` graphql file declarations.
- Loading branch information
1 parent
65d934a
commit 34447eb
Showing
11 changed files
with
312 additions
and
6 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
query SimpleQueryNoOverride { | ||
user { | ||
id | ||
name | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
generate/testdata/queries/SimpleQueryWithPointerFalseOverride.graphql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
query SimpleQueryWithPointerFalseOverride { | ||
user { | ||
id | ||
# @genqlient(pointer: false) | ||
name | ||
} | ||
} |
70 changes: 70 additions & 0 deletions
70
...ata/snapshots/TestGenerate-SimpleQueryNoOverride.graphql-SimpleQueryNoOverride.graphql.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
9 changes: 9 additions & 0 deletions
9
...a/snapshots/TestGenerate-SimpleQueryNoOverride.graphql-SimpleQueryNoOverride.graphql.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"operations": [ | ||
{ | ||
"operationName": "SimpleQueryNoOverride", | ||
"query": "\nquery SimpleQueryNoOverride {\n\tuser {\n\t\tid\n\t\tname\n\t}\n}\n", | ||
"sourceLocation": "testdata/queries/SimpleQueryNoOverride.graphql" | ||
} | ||
] | ||
} |
72 changes: 72 additions & 0 deletions
72
...impleQueryWithPointerFalseOverride.graphql-SimpleQueryWithPointerFalseOverride.graphql.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
9 changes: 9 additions & 0 deletions
9
...pleQueryWithPointerFalseOverride.graphql-SimpleQueryWithPointerFalseOverride.graphql.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"operations": [ | ||
{ | ||
"operationName": "SimpleQueryWithPointerFalseOverride", | ||
"query": "\nquery SimpleQueryWithPointerFalseOverride {\n\tuser {\n\t\tid\n\t\tname\n\t}\n}\n", | ||
"sourceLocation": "testdata/queries/SimpleQueryWithPointerFalseOverride.graphql" | ||
} | ||
] | ||
} |
126 changes: 126 additions & 0 deletions
126
...e/testdata/snapshots/TestGenerateWithConfig-OptionalPointer-testdata-queries-generated.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.