close

Filter

loading table of contents...

CoreMedia Content Cloud v12 Upgrade Guide / Version 2404

Table Of Contents

7.10.5 Controller for Persisted Queries Removed

Due to the introduction of Spring-GraphQL, the controller responsible for handling of persisted queries and related classes was removed. All configuration properties remain unchanged, and the behavior of all persisted query related handling remains as it was.

To disable the persisted query feature, add the autoconfiguration class to SpringBoots exclude list, for example, in an environment variable.

SPRING_AUTOCONFIGURE_EXCLUDE= com.coremedia.caas.web.persistedqueries.impl.PersistedQueryAutoConfiguration

The following interfaces remained public API:

  • com.coremedia.caas.web.persistedqueries.PersistedQueriesLoader

  • com.coremedia.caas.web.persistedqueries.QueryNormalizer

Headless Server delivers default implementation for both interfaces. The Spring Beans are created with the annotation @ConditionalOnMissingBean. This means that you can easily replace the default implementation by your own implementation simply by creating a Spring Bean with that interface.

Due to the fact, that persisted queries are not handled via its own controller but instead internally of the GraphQL framework, the HTTP response codes have changed in behavior. Formerly, the controller responded with HTTP-FORBIDDEN/403 or HTTP-NOT-FOUND/404, if a persisted query was not found or it was tried to send a query while only persisted queries were allowed.

Headless-Server now always responds with HTTP-OK/200 and an error message in the responded JSON. This is also true, if the allow list is activated. (see Section 7.10.6, “Allow List”).

Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

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