close

Filter

loading table of contents...

Release Notes / Version 12.2406.0

Table Of Contents

HeadlessServer: Update to GraphQL-Java 22.1

Along with the update of SpringBoot to V3.3, Spring-GraphQL was also updated to the bundled version 1.3. Consequently, the GraphQL-Java library was updated to the latest supported version 22.1. This update came with some breaking changes in its API, causing breaking changes in Headless Server also.

For details about the changes in GraphQL-Java, please see the original documentation at https://github.com/graphql-java/graphql-java/releases/tag/v22.1 and https://github.com/graphql-java/graphql-java/releases/tag/v22.0 .

These class were changed due to the mentioned API changes in GraphQL-Java 22.1:

  • DataFetcherMappingInstrumentation

  • ExecutionTimeoutInstrumentation

As long as these classes were not changed, nor CaasConfig was customized (where these classes are instantiated), this change might be considered non-breaking.

Stricter value coercion with GraphQL-Java v22.x

Please pay special attention on the breaking change in GraphQL-Java regarding “Stricter parseValue coercion: Aligning with JS reference implementation“.

This means, that the previous “relaxed” handling of query parameters sent as strings where the schema required a different type, e.g. an integer, will now fail query validation! See the release notes for https://github.com/graphql-java/graphql-java/releases/tag/v22.0

The stricter validation made it necessary to update the invocation of persisted queries over REST also. Since HTTP query parameters are strings by default, for query parameter of persisted queries other then of type string, a type mapping and conversion is now necessary. Persisted queries are mapped via their query-id to their (REST) URI-template. By default, this takes place in the file simple-mapping.properties (blueprint module headless-server-base at /resources/graphql/rest-mapping). The format used in this file was enhanced. The old format still supported, but for more complex mappings including a type mapping for certain parameters, the mapping now consists of a JSON object, containing the URI-template and the type mappings for all necessary variables.

# compatible, old rest mapping: query-id = uri-template
article = /article/{id}

# enhanced, new rest mapping: query-id = JSON-Object
search = {"uriTemplate": "/search/", "limit": "integer", "offset": "integer", "includeSubTypes": "boolean"}

(CMS-24945)

Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.