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]>
This commit is contained in:
Matúš Bafrnec
2022-11-17 18:19:35 -05:00
committed by GitHub
parent 80687e7336
commit 00f27609f0
2 changed files with 4 additions and 1 deletions
+1
View File
@@ -30,6 +30,7 @@ When releasing a new version:
- Fixed non-deterministic generated code when querying graphql interfaces.
- Fixed generated code when last component of package name is not a valid identifier (e.g. `"path/to/my-package"`).
- Fixed incorrect documentation of `for` directive.
## v0.5.0
+3 -1
View File
@@ -63,7 +63,9 @@ directive genqlient(
# # @genqlient(for: "MyInput.myField", omitempty: true)
# # @genqlient(for: "MyInput.myOtherField", pointer: true)
# # @genqlient(for: "MyOutput.id", bind: "path/to/pkg.MyOutputID")
# query MyQuery($arg: MyInput) { ... }
# query MyQuery(
# $arg: MyInput
# ) { ... }
# genqlient will generate a type
# type MyInput struct {
# MyField <type> `json:"myField,omitempty"`