Release Notes
Contents
| Guillotine 7 requires XP 7.14.0 or higher. |
Guillotine 7 Update 3
Release features
- maxQueryTokens support
-
You can configure the maximum number of raw tokens that the parser will accept in a GraphQL query, after which an exception will be thrown. By default
15000.
Guillotine 7 Update 2
Release features
- CORS support
-
Guillotine now supports Cross-Origin Resource Sharing (CORS). You can configure allowed origins, methods, and headers in the configuration. By default CORS is enabled.
Guillotine 7 Update 1
Release features
- Type definitions on NPM
-
Guillotine type definitions are now available on NPM. You can install them using the following command:
npm install @enonic/guillotine-types --save-dev
then use them in your code like this:
import type {GraphQL, Extensions} from '@enonic-types/guillotine';
import {ObjectTypeName} from '@enonic-types/guillotine';
- siteKey
-
A new
siteKeyargument has been added to theguillotinefield. This argument is optional and can be used instead of theX-Guillotine-SiteKeyheader.
siteKey argument.
{
guillotine(siteKey: "/my-site") {
get(key: "${site}") {
displayName
children {
displayName
type
}
}
}
}
- modifyUnknownFields
-
A new
graphql.extensions.modifyUnknownFieldsconfiguration option allows you to control how Guillotine handles unknown fields in the GraphQL schema. By default, Guillotine will throw an error if an unknown field is requested. You can now change this behaviour to ignore unknown fields or log a warning instead of throwing an error. See configuration for more information.
Guillotine 7
| This release includes breaking changes |
All media and content URLs in the pageUrl, imageUrl, mediaUrl, attachmentUrl fields and in the processedHtml field of RichText will be absolute (server) URLs generated in the context of your endpoint. If you want to use a different domain or base URL you should implement your own custom processing. |
Release features
- Extensions
-
Extensions are a new way to extend GraphQL schemas. They are more powerful and flexible than the
creationCallbacksin the Guillotine Lib. Now you can extend the GraphQL schema with custom types, input types, enums, unions, and interfaces, set or override data fetcher and type resolvers, modify already existing interfaces and types. See extensions for more information. - LocalContext
-
LocalContext allows sharing data between parent and child fields. See here for more information.
-
createDataFetcherResultfunction -
This function allows you to create a
DataFetcherResultobject with thedataandlocalContextfields to be returned from the data fetcher. See more information here. - Migrated from JS to Java
-
Guillotine has been fully reimplemented from JavaScript to Java. This transition has not only improved the performance and stability of the application but also enabled the implementation of more powerful and flexible ways of extending and customizing the GraphQL schema.
Breaking changes
- Subscriptions are not supported anymore
-
Due to limited use, GraphQL subscriptions are not supported anymore. You have to implement your own solution for this without using Guillotine.
- Params as JSON instead of String
-
For such fields as
pageUrl,mediaUrl,imageUrlandattachmentUrltheparamsargument hasJsontype instead ofString. - Site configuration
-
It is no longer possible to obtain the
siteConfigfrom thedataAsJsonandsitefields of theContenttype, as well as from thedataAsJsonfield of theportal_Sitetype.