Releases: 99designs/gqlgen
Releases · 99designs/gqlgen
v0.6.0
Changed
- Signpost methods are generated for empty interfaces - #335
- Non-Required arguments with defaults keep their pointers (
foo: Int = 1
->foo *int
) - #359
Added
- Extensions can now be added to the response via the RequestContext - #334
- Payload of websocket init message can now be fetched - #348
Fixed
v0.5.1
v0.5.0
Changed
- Errors that create nulls in required fields will now invalid the parent object, this behavior will bubble - #298
- HTTP GET requests can no longer do mutations #325
Added
- Limits can now be set on query complexity, preventing DOS attacks #315
- Ability to bind fields based on struct tags #308
- Gopath is now validated when starting gqlgen #312
- The parent result (
obj
) can now be accessed by directives and from context #301 #314 - Query validation is now memoized across requests #318
- Descriptions have been added to generated code #320
gqlgen version
now reports the current version #326
Fixed
- Examples and doc cleanups #298 #304
- Introspection API fixes #307
- Fixed a bug in the graphql client that was hiding errors #311
gqlgen init
now works on windows #299
Removed
- json typemaps are no longer supported #321
- old cli flags
package
,modelPackage
,exec
,server
,models
have been removed, these are available in config #322
Shoutout to @edsrzf @vvakame @porty @android @codyleyhan @jekaspekas for bringing us another great release!
v0.4.4
Fixed
- Forcing resolvers for existing fields no longer looks at the existing fields pointers
- Directives are now sorted in the generated code, preventing non deterministic ordering
- The gqlgen command now explicitly depends on the code required to run generated code, preventing dep from pruning things that are required
Changed
- Switching to vX.X.X tags so we can start experimenting with go modules
0.4.3
0.4.2
Fixed:
gqlgen init
now has a better error message if config file already exists- keyword collisions on args like
type
will now use the more linter friendlytypeArg
instead oftype_
github.com/vektah/gqlgen/handler
will now be imported correctly- variable validation errors will no longer double up on responses
- NON_NULL types will now be returned by introspection correctly and introspection has better test coverage
0.4.1
0.4.0
Updating to 0.4.0 is going to require a few things:
- Update any references to
github.com/vektah/gqlgen
to point togithub.com/99designs/gqlgen
- Delete any existing generated code to remove broken imports paths
- Run
dep ensure -update github.com/99designs/gqlgen github.com/vektah/gqlparser
- Update your handler from
graph.NewExecutableSchema(&graph.Graph...)
tograph.NewExecutableSchema(graph.Config{Resolvers: &graph.Graph...})
go generate ./...
Removed
- The old (underscore separated) resolver syntax is no longer supported
Changed
- Moved repo from
github.com/vektah/gqlgen
togithub.com/99designs/gqlgen
- Switched the parser over to gqlparser, which brings us up to date with the June 2018 spec. This includes better directive support and a bunch of bug fixes around validation.
- The implicit prelude no longer includes custom types defined by gqlgen. This means if you are using
Map
orTime
you will need to addscalar Map
to your schema. The default implementations are still provided, but the type isn't being included automatically in the schema. - A bunch of internal interfaces have changed slightly. They should all break in fairly obvious ways.
- To support directives NewExecutableSchema now takes a config object.
- Generated models are now more linter friendly, following the same capitalization rules in go lint for common acronyms.
- ResolverMiddleware has been renamed to FieldMiddleware, and now runs on every field.
- Descriptions in introspection now need to use block syntax instead of comments, """this is a field description"""
- Custom unmarshallers need to handle json.Number to prevent loss of precision when using variables
Added
gqlgen init
: You can now create a project skeleton quickly and easilygqlgen
will now generate resolver stubs if you specify the new resolver config key.- Support for field directives in schema: This is the most common use case, more will follow. see #228 for planning for other directive types.
- Support for
@skip
and@include
- Added ability to map to different field names when binding to existing models
Fixed
- Scalars passed into array contexts will now correctly be coerced into arrays
- Variables will now have their types validated properly.
- Large ints in variables were losing precision after 52 bits due to a float bug.