github graphql-java/graphql-java v9.0
Release 9.0

latest releases: v22.1, v22.0, v21.5...
5 years ago

Data Loader performance has been greatly improved

The performance of graphql.execution.instrumentation.dataloader.DataLoaderDispatcherInstrumentation has been greatly improved. It now tracks which fields are outstanding and how many values are expected for that field. This allows it to optimise when it "dispatches" the underlying data loaders so that they retrieve as much data as possible in one call.

PR: #990

Directive Wiring Support

The new graphql.schema.idl.SchemaDirectiveWiring interface allows you to wire in new behaviour to the SDL built graphql schema via directives that are placed on SDL types and fields.

For example imagine a type such as the following

    directive @auth(role : String!) on FIELD_DEFINITION

    type Employee
        id : ID
        name : String!
        startDate : String!
        salary : Float @auth(role : "manager")
    }

You can now wire in data fetcher behaviours that enforce the authorisation access to those specific fields.

PR: #1001

Directives MUST be declared in the schema

If you use a directive in the schema, you now MUST declare it up front and on what places it can apply. This is required by the graphql specification. eg:

 directive @length(max: Int = -1) on FIELD_DEFINITION | INPUT_FIELD_DEFINITION

There is an boolean flag that allows you to use the old lenient behaviour but its off by default.

PR: #1006

PropertyDataFetcher has been optimised

The default and most called data fetcher graphql.schema.PropertyDataFetcher has been optimised to make it run faster. It now caches method look ups so that the costs of reflection is not paid over and over

PR: #1013

@defer support is no longer experiemental

It is now considered a supported operation in graphql-java.

PR: #1035

New Traverser for analyzing queries:

QueryTraverser is a new traverser for Documents (or part of it) which tracks at the same time the type
informations of the Schema. It is intended to be used for advanced use-cases including libraries build on top of graphql-java.

PR: #1031

More

See the following Pull Requests for more information on other changes v9.0

Don't miss a new graphql-java release

NewReleases is sending notifications on new releases.