Headless Server Developer Manual / Version 2406.0
Table Of Contents
The Metadata Root provides custom metadata for fields. It is configured via a GraphQL schema extension within the
file metadata-schema.graphql
and implemented in the class MetadataRoot.
The Metadata Root delivers type definitions retrieved via introspection together with their fields. The fields are enriched with metadata information. The following type definitions are supported:
- InterfaceTypesDefinition
- ObjectTypesDefinition
Query to retrieve metadata:
{ metadata { types { name fields { name metadata } } } }
Customization
Custom metadata can be added by adding a bean of type MetadataProvider to the Spring context.
Configuration
The Metadata Root can be disabled by adding its autoconfiguration class to SpringBoots exclude list, e.g. in an environment variable.
SPRING_AUTOCONFIGURE_EXCLUDE=com.coremedia.caas.web.metadata.MetadataAutoConfiguration