v5.7.0
What’s Changed
This release introduces a new experimental API for generating client API. It can be turned on using generateClientv2
config option and is opt-in. The original generateClient
v2 implementation is still the default.
The v2 implementation solves 1) Not being able to handle cycles in the schema, and 2) Not being able to generate on larger schemas due to too many classes getting generated, and out of memory errors We only generate one class per type in the new implementation.
Finally, the projection root needs to be instantiated differently, and hence this is a v2 API. Eventually, this will be the default implementation and a breaking release in the future.
Older API:
String query = new GraphQLQueryRequest(
new MoviesGraphQLQuery(),
new MoviesProjectionRoot().movieId()).serialize();
New API:
String query = new GraphQLQueryRequest(
new MoviesGraphQLQuery(),
new MoviesProjectionRoot<>().movieId()).serialize();
Note the difference in the use of generics in the MoviesProjectionRoot
Other changes and PRs:
- Rename config for v2 client. (#528) @srinivasankavitha
- Refactor generation of client projections (#522) @srinivasankavitha
- Make Kotlin2CodeGen respect implementSerializable config (#518) @pgrosslicht
- Ignore non-GraphQL files in the schema path (#525) @gracecding
- Handle the empty schema case (#523) @gracecding