Skip to content

Releases: 99designs/gqlgen

v0.7.0

28 Nov 03:28
Compare
Choose a tag to compare

Changed

  • We no longer recommend installing gqlgen on your gopath/bin, instead create a script - #416
  • Underscores will now be ignored for matching fields to model methods - #370
  • If errors is present in the response it will be sent first - #369
  • Updated to latest version of graphql-playground - #409
  • Moved our docs to render - #425
  • Floats will now handle up to 64bits of precision on the wire, instead of truncating to 6 decimal places - #449

Added

  • Multiple schema files can be now be loaded, see config docs - #389
  • Added pluggable tracing system - #392
  • Added gqlgen-contrib with tracing implementations for opentracing, opencensus and apollo tracing.
  • The current resolvers errors can now be fetched from context - #411
  • Model methods can now optionally receive a context param - #422
  • Introspection can now be disabled - #447

Fixed

  • Fixed a pointer comparison issue when binding to slice types - #439
  • Updated to v1.0.0 of gqlparser. Heaps of extra validation messages and bugs fixed

Removed

v0.6.0

03 Oct 00:38
Compare
Choose a tag to compare

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

  • Contexts from middleware are propagated down the execution tree - #353
  • Embedding pointers to structs now works correctly - #358
  • goimports will no longer magically add missing imports - #365

v0.5.1

13 Sep 01:57
Compare
Choose a tag to compare

Fixed

  • Goroutines don't leak when using subscriptions #339

v0.5.0

31 Aug 02:17
Compare
Choose a tag to compare

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

21 Aug 03:15
@lwc lwc
Compare
Choose a tag to compare

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

10 Aug 03:54
3575c28
Compare
Choose a tag to compare

Fixed:

  • Missing default args on introspection

0.4.2

10 Aug 00:05
06b00d4
Compare
Choose a tag to compare

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 friendly typeArg instead of type_
  • 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

04 Aug 02:24
42f10ec
Compare
Choose a tag to compare

Fixed

  • Introspection api was not returning args or default values

0.4.0

03 Aug 06:04
7b5a3d7
Compare
Choose a tag to compare

Updating to 0.4.0 is going to require a few things:

  • Update any references to github.com/vektah/gqlgen to point to github.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...) to graph.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 to github.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 or Time you will need to add scalar 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 easily
  • gqlgen 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.

0.3.0

14 Jul 07:06
381b346
Compare
Choose a tag to compare

Changed

  • Method return values must now match expected type, if not a resolver is added - #193
  • Nullability is now applied correctly in lists - #191
  • Multiple error from the same resolver are now supported - #186

Added

  • Resolvers can be forced for generated types - #190

Fixed

  • Multiline comments on enums no longer break output - #194
  • Config will now complain about unknown keys - #192