Releases: 99designs/gqlgen
v0.9.2
Added
- Lots of doc improvements
- More linters - #805
Fixed
gqlgen init
should now work again - #781 #821- A keepalive is now sent on init - #820
- windows infinite loop when unable to find a mod file - #822
- Pointer checks for values returned by directives - #768
- Missing comments on enums are now passed through to generated models - #780
A big Thank You to everyone whos put in the time to make this release possible - @nii236 @pmachan @bugzpodder @flrossetto @andrey1s @schparky @muesli @oshalygin @dissipative @y15e @zdebra @qhenkart @sunfmin @vvakame @lwc and many more.
v0.9.1
Changed
- There is a subtle break in argument directives, they used to receive the argument value as
obj
, but not receive the whole argument bag. The argument value should be fetched by calling next, so if you were relying on this behavior the implementation was incorrect and inconsistent with all other directive implementations.
Added
- schema file paths now support
**
globs - #631 - new
WebsocketInitFunc
hook on websocket connection to allow blocking websockets - #750 - Automatic Persisted Queries (APQ) support - #734
- execution (query) directive support for FIELD, QUERY, MUTATION and SUBSCRIPTION - #744 and #756
- directives that allow config in schema - #732
- models can now be automatically bound within a path - #761
Fixed
v0.9.0
⚠️ ⚠️ This release contains changes that require extra care ⚠️ ⚠️
Complexity changes
A bug was preventing complexity funcs from being called, if you are using complexity functions when updating to 0.9 they may start working, and some requests may get blocked.
If you dont have a great testsuite to lean on, we suggest turning off complexity and adding request middleware to determine your new high water mark
handler.RequestMiddleware(func(ctx context.Context, next func(ctx context.Context) []byte) []byte {
defer func() {
fmt.Println("complexity was", graphql.GetRequestContext(ctx).OperationComplexity)
}()
return next(ctx)
}),
Enforcing Content-Type
gqlgen now only accepts POST requests with multipart/form-data
(new!) or application/json
, this affect most clients but make sure you do some end to end testing with your clients.
dep users
You will probably get undefined: packages.NeedName
when updating, this is because we have no way to force transitive dependencies to update for dep. You will need to run:
dep ensure -update golang.org/x/tools
You should probably consider updating to go modules, they are actually pretty great (just make sure you're running at least gqlgen 0.8 first).
Changelog
Changed
- Content type is now enforced for POST requests - #689
- Fix complexity funcs had incorrect cases, causing them to NOT RUN - #668
- IsZero is no longer automatically called on anything except time.Time - #702
- Pointers are now automatically added for struct fields that are structs to prevent loops - #701
- Pointers are now automatically added for slices of structs - #710
Fixed
- Introspection now correctly filters deprecated - #687
- More inconsistent cases - #700
- Removed a data race - #705
Added
- File uploads are now supported - #655
- Hard coded templates can now be used in plugins - #673
- New
Any
type can be used the same way as map - #686 - Mapping to objects onto scalars is now allowed - #706
Performance
v0.8.3
v0.8.2
Changed
- nils returned as [Thing] will return nulls, but only for non required arrays - #619
- error path will prefer to use the user specified input path - #620
- updated graphql playgroun - #613
Added
- Can now determine from field context if that field was a method - #618
- docs for gin - #606
- complexity limit can now be configured per request - #610
- a new gqlgen workshop for our docs - #614
Fixed
- scalars with no explicit implentation will use string marshaling - #605
- interfaces in unions are no longer wrapped in pointers - #633
- any type aliasing string will use the default string marshaller - #634
- complexity root should handle duplicate fields gracefully - #622
- more initialisim case bugs - #591
- getting started with dep should run smoothly again - #628
- directive arguments with custom types - #604
- more parser validation - #611
- a bunch of map[string]interface{} issues, and added docs - #612
- redeclaring a builtin optional scalar like
Time
orMap
no longer generates an error - #635
v0.8.1
v0.8.0
Another huge release. Lots of changes under the covers as we march on towards 1.0
This release requires golang 1.11+
Added
- we now support go modules - see the new getting started guide
- First cut of the new plugin system. model and resolver generation are now plugins and can be replaced if you want. See plugins for more details.
- There can now be multiple backing go types for a given graphql type. This means we can now support
int
,int32
andint64
at the same time forInt
. You can also use this logic for automatically mapping protobuf timestamps to graphqlTime
. See config for the new config keys. - #534 - Support for directives on arguments and input fields - #460
- Enums now generate an AllEnum list, so you can easily enumerate all valid values - #486
- more validation of schemas, less weird errors (hopefully) - #526
- check IsZero on types that support it and convert to nulls on the wire - #540
- improved collect fields api and docs - #551
Changed
- Some small performance improvements - #465
- we now always return pointers to structs from resovers - #375
Fixed
v0.7.2
v0.7.1
v0.7.0
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
- The opentracing implementation has been moved to https://github.com/99designs/gqlgen-contrib