Repository navigation
v0.9.0
First release of github.com/gql-go/graphql, the community-maintained continuation of graphql-go/graphql.
It ships everything merged upstream since v0.8.1 (April 2023), which was never released, under the new module path.
Migrating
The API is unchanged. Replace the import prefix:
github.com/graphql-go/graphql -> github.com/gql-go/graphql
New
- Query plans and plan cache (graphql-go/graphql#740, @Nthalk):
PlanQuery,
ExecutePlanandPlanCacheprecompute the per-operation work (field
collection, field definition lookup, literal argument coercion, constant
@include/@skip) so a repeated operation only pays the per-request part.
PlanCacheis a bounded LRU with an optionalNormalizemode that lets
queries differing only in literal values share a plan.Executekeeps its
behaviour and now runs on top of the plan internally.
Fixes
- Abstract-field selections are planned lazily, avoiding an exponential blow-up
on deeply nested interfaces and unions (graphql-go/graphql#747, @patrikhermansson). - The overlapping-fields validation rule terminates on cyclic fragment spreads
(graphql-go/graphql#741, @mennatnaga). operationNamein thehttp-postexample (graphql-go/graphql#673, @qustavo).
Performance
- Faster
printer.Print(graphql-go/graphql#682, @adelsz).
Maintenance
- Unit test coverage raised to ~100% in the executor, definitions, introspection,
parser, printer and AST packages (graphql-go/graphql#732, #733, #734, #743-#746,
#748, #752, #753 upstream, @chris-ramon). - Small cleanups (graphql-go/graphql#684, @testwill; graphql-go/graphql#725, graphql-go/graphql#727).
- CI moved from CircleCI to GitHub Actions, testing Go 1.21 and the latest
stable release with the race detector.
Thanks
To @chris-ramon and @sogko for creating and maintaining graphql-go/graphql, and to everyone whose work is in this release.