🎉 GraphQL Kotlin 6.0.0!
Automatic Coroutine Context Propagation
graphql-kotlin-server
automatically populates GraphQLContext
map with appropriate coroutine scope. This scope contains coroutine context that was available when processing the incoming HTTP request and is subsequently used by all data fetchers to resolve the underlying fields. Users can customize the coroutine context by providing CoroutineContext::class
entry in custom GraphQL context using GraphQLContextFactory
.
See https://github.com/ExpediaGroup/graphql-kotlin/pull/1349 for details.
Apollo Federation v2 support
Federation v2 is an evolution of the Federation spec to make it more powerful, flexible, and easier to adapt. While v1 and v2 schemas are similar in many ways, Federation v2 relaxes some of the constraints and adds additional capabilities.
See https://github.com/ExpediaGroup/graphql-kotlin/pull/1459 for details.
Update to graphql-java 18
Adds support for applied schema directive. In previous versions, GraphQLDirective represented both a schema definition object as well as individual instances that were applied to a schema or query element. Schema generation logic was updated to continue generating GraphQLDirective schema definitions and then create a corresponding instance of GraphQLAppliedDirective that is applied to a target element.
See https://github.com/ExpediaGroup/graphql-kotlin/pull/1393 for details.
Batching and deduplication of data fetchers for BatchGraphQLRequests
graphql-kotlin-server
can now execute graphql queries concurrently, and because of that we added the capability to use DataLoaders for all queries being executed concurrently, we also added a new custom instrumentation that will dispatch the DataLoaderRegistry when all synchronous data fetchers where dispatched instead of doing it by level simulating what the javascript event loop does with the data loaders and solving these issues:
- https://github.com/graphql-java/graphql-java/discussions/2715
- https://github.com/graphql-java/graphql-java/issues/1198
See https://github.com/ExpediaGroup/graphql-kotlin/pull/1419 for details.
More information and examples on our docs
Apollo Automatic Persisted Queries (APQ) support
APQ is a technique created by Apollo to improve GraphQL network performance with zero build-time configuration by sending smaller GraphQL HTTP requests, a smaller request payload reduces bandwidth utilization and speeds up GraphQL client loading times.
See https://github.com/ExpediaGroup/graphql-kotlin/pull/1474 for details.
More information and examples on our docs
Argument deserialization no longer relies on Jackson
Data fetcher argument parsing logic no longer depends on Jackson. Old logic was problematic as arguments passed to data fetchers were already coerced to appropriate type by graphql-java
but since Jackson was unaware of it, it was resulting in a duplicate deserialization. This caused custom scalar inputs deserialization problems.
See https://github.com/ExpediaGroup/graphql-kotlin/pull/1379 for details.
5.x.x Support
Going forward we will only support the 5.x.x
branch for critical security issues or urgent bug fixes.
Feedback
As with any open source project, we want to thank the community for using our library and providing valuable feedback and even pull requests. We will continue to support this library and use it in production at @ExpediaGroup, but the goal of the project is still to make GraphQL development easier for everyone. If you have a feature request or question, feel free to start a new discussion, create a new issue or reach out to our public Slack channel.
GitHub has the full list of contributors since we made the 6.0.0 cut.
Major Changes
- [client] generate fallback/default implementation for polymorphic types (#1382) @dariuszkuc
- [generator] avoid duplicate argument deserialization (#1379) @dariuszkuc
- [client] kotlinx support for custom scalar optional input (#1357) @dariuszkuc
- standardize coroutine context propagation in the execution (#1349) @dariuszkuc
- feat: graphql-kotlin-dataloader (#1415) @samuelAndalon
- [dependency] update to graphql-java 18 (#1393) @dariuszkuc
Minor Changes
- [generator] add IDValueUnboxer for correctly serializing ID value class (#1385) @dariuszkuc
- feat: transaction batcher module (#1348) @samuelAndalon
- [server] concurrent execution for batched queries (#1301) @samuelAndalon
- feat: DataLoader Sync Execution Exhaustion Instrumentation (#1419) @samuelAndalon
- feat: rename instrumentation module (#1418) @samuelAndalon
- feat: remove transaction-batcher module (#1411) @samuelAndalon
- feat: transaction batcher instrumentation level (#1378) @samuelAndalon
- feat: add dataLoader instrumentation configuration to server (#1423) @samuelAndalon
- feat: support directives with the union annotation (#1424) @bherrmann2
- [generator] Apollo Federation v2 support (#1459) @dariuszkuc
- [executions] do not apply data loader instrumentation if execution is a Mutation (#1468) @samuelAndalon
- [generator] add support for schema directives (#1466) @dariuszkuc
- [generator] add willGenerateDirective hook (#1461) @dariuszkuc
- [executions] KotlinDataLoader to provide DataLoader (#1462) @samuelAndalon
- feat: remove dataLoaderRegistry from GraphQLContext (#1448) @samuelAndalon
- feat: support chained dataloaders in a single resolver (#1436) @samuelAndalon
- Update spring-server to use FlowSubscriptionSchemaGeneratorHooks (#1479) @dariuszkuc
- [client] support non JSON primitive scalars (#1488) @dariuszkuc
Patch Changes
- [build] update to latest federation-jvm (#1381) @dariuszkuc
- [generator] apply hooks after filtering properties and functions (#1374) @dariuszkuc
- feat: add GraphQLContext extension functions (#1369) @samuelAndalon
- [generator] filter lambda properties (#1366) @dariuszkuc
- [generator] support repeatable directives (#1360) @dariuszkuc
- [generator] support input field deprecation (#1361) @dariuszkuc
- [build] update to latest version of dependencies (#1358) @dariuszkuc
- [generator] mark default PropertyDataFetcher as "trivial" (#1359) @dariuszkuc
- [generator] support directive array/vararg parameters (#1431) @dariuszkuc
- Upgrade to KotlinPoet v1.11.0, make corresponding required changes. (#1427) @bsorbo
- fix: willAddGraphQLTypeToSchema needs annotations from field (#1437) @bherrmann2
- [generator] fix Federation _service query definition (#1460) @dariuszkuc
- feat: update graphql-java dataloader version (#1450) @samuelAndalon
- chore: tests for batching and deduplication by field selection (#1449) @samuelAndalon
- upgrade dependencies - springBoot, spring, kotlin (#1447) @tapaderster
- Value type improvements (#1428) @rocketraman
- use more inclusive terms (#1440) @tapaderster
- [federation] fix service SDL to include schema
@link
info (#1487) @dariuszkuc
Other Changes
- Class name in SchemaGeneratorHooksProvider example (#1383) @ashu-dd
- Fix typo in data-loaders.md (#1372) @matsluni
- [docs] update information about optional arguments and default values (#1367) @dariuszkuc
- [build] update to Gradle 7.3.3 (#1354) @dariuszkuc
- start 6.x.x development (#1353) @dariuszkuc
- examples/ktor-server: expose GraphQL Schema at /sdl (#1351) @jmfayard
- Fix broken link (#1345) @jgorman-exp
- Release drafter now supports putting "other changes" in a category (#1343) @smyrick
- [build] update dependencies (#1413) @dariuszkuc
- [docs] fix gradle plugin tasks example (#1406) @dariuszkuc
- [docs] fix breaking page on Expedia logo click (#1401) @rv12kumar
- [docs] documentation on inline value classes (#1395) @dariuszkuc
- [docs] update to latest docusaurus (#1391) @dariuszkuc
- [build] Optimize CI a bit (#1390) @Goooler
- [examples] update federation gateway example to latest (#1387) @dariuszkuc
- [docs] Update README.md (#1386) @imashnake0
- Remove deprecated XX:MaxPermSize JVM argument from gradle properties, causing failures with Java 17 (#1425) @bsorbo
- Fix typo in README (#1433) @viomckinney
- [executions] Apollo Automatic Persisted Queries (APQ) support (#1474) @samuelAndalon
- feat: publish sources for snapshots (#1483) @samuelAndalon
- small letter case fix (#1484) @nikitakoselev
- feat: add extensions to ExecutionInput from GraphQLRequest (#1482) @samuelAndalon
Source code(tar.gz)
Source code(zip)