Docs
Try Apollo Studio

Composition hints


When you successfully compose the schemas provided by your subgraphs into a supergraph schema, the composition process might output hints that provide additional information about the result. Hints are primarily informative and do not necessarily indicate that a problem needs to be fixed.

Hints are categorized under the following levels:

  • WARN: Indicates a situation that might be expected but is usually temporary and should be double-checked. Typically, composition might have needed to ignore some elements from some subgraph when creating the supergraph.
  • INFO: Suggests a potentially helpful improvement or highlights a noteworthy resolution made by composition. Can otherwise be ignored.
  • DEBUG: Lower-level information that provides insight into the composition. These hints are of lesser importance/impact.

Note that hints are first and foremost informative and don't necessarily correspond to a problem to be fixed.

This document lists the hints that can be generated for each level, with a description of why each is generated.

The following hints might be generated during composition:

WARN

CodeDescriptionLevel
INCONSISTENT_DEFAULT_VALUE_PRESENCEIndicates that an argument definition (of a field/input field/directive definition) has a default value in only some of the subgraphs that define the argument.WARN
INCONSISTENT_INPUT_OBJECT_FIELDIndicates that a field of an input object type definition is only defined in a subset of the subgraphs that declare the input object.WARN
INCONSISTENT_ENUM_VALUE_FOR_INPUT_ENUMIndicates that a value of an enum type definition (that is only used as an Input type) has not been merged into the supergraph because it is defined in only a subset of the subgraphs that declare the enumWARN
INCONSISTENT_EXECUTABLE_DIRECTIVE_PRESENCEIndicates that an executable directive definition is declared in only some of the subgraphs.WARN
NO_EXECUTABLE_DIRECTIVE_INTERSECTIONIndicates that, for an executable directive definition, no location for it appears in all subgraphs.WARN
INCONSISTENT_EXECUTABLE_DIRECTIVE_REPEATABLEIndicates that an executable directive definition is marked repeatable in only a subset of the subgraphs (and will not be repeatable in the supergraph).WARN
INCONSISTENT_EXECUTABLE_DIRECTIVE_LOCATIONSIndicates that an executiable directive definition is declared with inconsistent locations across subgraphs (and will use the intersection of all locations in the supergraph).WARN
INCONSISTENT_DESCRIPTIONIndicates that an element has a description in more than one subgraph, and the descriptions are not equal.WARN
INCONSISTENT_ARGUMENT_PRESENCEIndicates that an optional argument (of a field or directive definition) is not present in all subgraphs and will not be part of the supergraph.WARN
FROM_SUBGRAPH_DOES_NOT_EXISTSource subgraph specified by @override directive does not existWARN
INCONSISTEN_NON_REPEATABLE_DIRECTIVE_ARGUMENTSA non-repeatable directive is applied to a schema element in different subgraphs but with arguments that are different.WARN
DIRECTIVE_COMPOSITION_WARNIndicates that an issue was detected when composing custom directives.WARN

INFO

CodeDescriptionLevel
INCONSISTENT_BUT_COMPATIBLE_FIELD_TYPEIndicates that a field does not have the exact same types in all subgraphs, but that the types are "compatible" (2 types are compatible if one is a non-nullable version of the other, a list version, a subtype, or a combination of the former).INFO
INCONSISTENT_BUT_COMPATIBLE_ARGUMENT_TYPEIndicates that an argument type (of a field/input field/directive definition) does not have the exact same type in all subgraphs, but that the types are "compatible" (two types are compatible if one is a non-nullable version of the other, a list version, a subtype, or a combination of the former).INFO
INCONSISTENT_ENTITYIndicates that an object is declared as an entity (has a @key) in only some of the subgraphs in which the object is defined.INFO
OVERRIDDEN_FIELD_CAN_BE_REMOVEDField has been overridden by another subgraph. Consider removing.INFO
OVERRIDE_DIRECTIVE_CAN_BE_REMOVEDField with @override directive no longer exists in source subgraph, the directive can be safely removedINFO
DIRECTIVE_COMPOSITION_INFOIndicates that an issue was detected when composing custom directives.INFO

DEBUG

CodeDescriptionLevel
INCONSISTENT_OBJECT_VALUE_TYPE_FIELDIndicates that a field of an object "value type" (has no @key in any subgraph) is not defined in all the subgraphs that declare the type.DEBUG
INCONSISTENT_INTERFACE_VALUE_TYPE_FIELDIndicates that a field of an interface "value type" (has no @key in any subgraph) is not defined in all the subgraphs that declare the type.DEBUG
INCONSISTENT_UNION_MEMBERIndicates that a member of a union type definition is only defined in a subset of the subgraphs that declare the union.DEBUG
INCONSISTENT_ENUM_VALUE_FOR_OUTPUT_ENUMIndicates that a value of an enum type definition (that is only used as an Output type, or is unused) has been merged in the supergraph but is defined in only a subset of the subgraphs that declare the enumDEBUG
INCONSISTENT_TYPE_SYSTEM_DIRECTIVE_REPEATABLEIndicates that a type system directive definition is marked repeatable in only a subset of the subgraphs that declare the directive (and will be repeatable in the supergraph).DEBUG
INCONSISTENT_TYPE_SYSTEM_DIRECTIVE_LOCATIONSIndicates that a type system directive definition is declared with inconsistent locations across subgraphs (and will use the union of all locations in the supergraph).DEBUG
UNUSED_ENUM_TYPEIndicates that an enum type is defined in some subgraphs but is unused (no field/argument references it). All the values from subgraphs defining that enum will be included in the supergraph.DEBUG
Edit on GitHub
Previous
Error codes
Next
Federated trace data