Add support for mapping all nullable types as pointers (#198)

This implements the approach suggested in
https://github.com/Khan/genqlient/issues/178#issuecomment-1077559343.
See the added documentation for the full behavior.
This commit is contained in:
Chris Connelly
2022-05-24 12:24:06 -07:00
committed by GitHub
parent 3685f3f66b
commit 37fa3d6e7c
7 changed files with 336 additions and 17 deletions
+1
View File
@@ -31,6 +31,7 @@ When releasing a new version:
- You can now enable `use_extensions` in the configuration file, to receive extensions returned by the GraphQL API server. Generated functions will return extensions as `map[string]interface{}`, if enabled.
- You can now use `graphql.NewClientUsingGet` to create a client that uses query parameters to pass the query to the GraphQL API server.
- In config files, `schema`, `operations`, and `generated` can now be absolute paths.
- You can now configure how nullable types are mapped to Go types in the configuration file. Specifically, you can set `optional: pointer` to have all nullable GraphQL arguments, input fields, and output fields map to pointers.
### Bug fixes: