Skip to content

Commit 00f2760

Browse files
authored
fixed "for" directive documentation (#235)
This PR is addressing the behavior described in #151. The former version of `for` directive example usage ended in: ``` genqlient.graphql:<line>: for is only applicable to operations and arguments ``` I have: - [x] Written a clear PR title and description (above) - [x] Signed the [Khan Academy CLA](https://www.khanacademy.org/r/cla) - [x] Added tests covering my changes, if applicable - [x] Included a link to the issue fixed, if applicable - [x] Included documentation, for new features - [x] Added an entry to the changelog Signed-off-by: Matúš Bafrnec <[email protected]>
1 parent 80687e7 commit 00f2760

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

docs/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ When releasing a new version:
3030

3131
- Fixed non-deterministic generated code when querying graphql interfaces.
3232
- Fixed generated code when last component of package name is not a valid identifier (e.g. `"path/to/my-package"`).
33+
- Fixed incorrect documentation of `for` directive.
3334

3435
## v0.5.0
3536

docs/genqlient_directive.graphql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ directive genqlient(
6363
# # @genqlient(for: "MyInput.myField", omitempty: true)
6464
# # @genqlient(for: "MyInput.myOtherField", pointer: true)
6565
# # @genqlient(for: "MyOutput.id", bind: "path/to/pkg.MyOutputID")
66-
# query MyQuery($arg: MyInput) { ... }
66+
# query MyQuery(
67+
# $arg: MyInput
68+
# ) { ... }
6769
# genqlient will generate a type
6870
# type MyInput struct {
6971
# MyField <type> `json:"myField,omitempty"`

0 commit comments

Comments
 (0)