23

Release 2.0.0 · ExpediaGroup/graphql-kotlin · GitHub

 4 years ago
source link: https://github.com/ExpediaGroup/graphql-kotlin/releases/tag/2.0.0
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

tada GraphQL Kotlin 2.0!

The team is finally ready to ship the next version of GraphQL Kotlin! We have some breaking changes in the latest version. Some were caused by dependency updates, and others were changes to the library that hopefully make it easier to use. We have the full list of all the changes below but let's review some of the more impactful changes.

New Hooks Interface

We have updated the signature for the SchemaGeneratorHooks to allow for more customization and remove duplication of the hooks.

The DataFetcherExecutionPredicate was removed in #478 and the KClass was added to some hooks in #530.

graphql-java 14

We have updated to the latest version of graphql-java in #568 which was also a breaking change for that library. One of the bigger changes was the addition of the GraphQLNamedType which means that all types do not have a name field by default.

Replace GraphQLContext annotation

We have replaced the GraphQLContext annotation with interface in #610. This puts us in line with other patterns in the library, like how you use the DataFetchingEnvironment, and means that you no longer have to annotate every single usage of your context class.

New features

We had some pending feature requests that we were also able to add to the new release. Lists can be used as input with #546, sealed classes can be used as interfaces in #645, subscriptions have their own hooks in #544, and in #598, the SchemaGenerator class and some of its methods have been made open so you can further customize the generation without having to rewrite our code.

1.x.x Support

Going forward we will only support the 1.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 server development easier for everyone. If you have a feature request or question, feel free to create a new issue or reach out to our public Slack channel.

GitHub has the full list of contributors since we made the 2.0.0 cut.


warning Major Changes

  • BREAKING CHANGE: Refactor graphQLTypeOf to top level function (#535) @smyrick
  • BREAKING CHANGE: empty complex types should fail schema generation (#541) @dariuszkuc
  • BREAKING CHANGE: Refactor schema generator to remove cyclic dependencies (#532) @smyrick
  • BREAKING CHANGE: [generator] update generator hooks to include target kclass info (#530) @dariuszkuc
  • BREAKING CHANGE: [spring-server] default data fetcher should use Jackson object mapper from spring context (#525) @dariuszkuc
  • BREAKING CHANGE: [federation] federated type resolvers should have access to environment (#473) @dariuszkuc
  • BREAKING CHANGE: Remove DataFetcherExecutionPredicate (#478) @smyrick
  • Update to next major release (#480) @dariuszkuc
  • Add additionalTypes to generateSchema (#622) @de55
    • This change is breaking from the master branch but actually removes a feature that was only added since the 2.0 cut so it is backwards compatible with 1.x
  • BREAKING CHANGE: Make the KotlinDataFetcherFactoryProvider nullable (#623) @smyrick
  • [generator] Replace GraphQLContext annotation with interface (#610) @smyrick

clipboard Minor Changes

  • feat: open FunctionDataFetcher methods for extension (#582) @smyrick
  • Add Apollo Subscription Hooks (#544) @de55

2.0.0

beetle Patch Changes

  • [federation] federated directives integration tests (#548) @dariuszkuc
  • [generator] Rename internal files (#545) @smyrick
  • Refactor federation validation unit tests (#540) @smyrick
  • Prevent starting second subscription with the same id (#520) @gklijs
  • Fix subscription caching logic (#515) @smyrick
  • Add perf tests to validate subscription performance (#514) @smyrick
  • Do not close session on subscription GQL_STOP (#513) @smyrick
  • fix subscriptions by not removing the ak subscription when one of the… (#510) @gklijs
  • Log schema with starting newline (#502) @smyrick
  • Add unit tests for renaming input type fields (#501) @smyrick
  • Allow for subscription request on the same endpoint (#487) @smyrick
  • Update dependency versions and docs (#571) @smyrick
  • [federation] Move vals and functions to internal scope (#569) @smyrick
  • [generator] deprecated directive cleanup (#591) @dariuszkuc
  • Allow additional types to be added with custom SchemaGenerator (#587) @smyrick
  • [generator] Fix issue generating nested additional types (#615) @smyrick
  • Update completable future mapping for coroutines (#613) @smyrick

RC9.1

  • Upgrade spring boot to fix security issue (#627) @smyrick
    • Please update your own included spring boot version to 2.2.5 to match this release as it included import security updates from downstream projects

RC12.1

  • Reduce number of class scanners created in tests (#646) @smyrick

package All Changes

There were also a number of commits that were not part of the library changes, like updating our GitHub actions and documentation. You can see a list of each commit in every release version since 2.0.0.RC1 in the release notes.

Here is the full tag compare for a single list of all changes since the last full release: 1.4.3...2.0.0


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK