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