Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FieldInfo ¶
type FieldInfo struct { // Services is the set of all services that can resolve this // field. If a service has multiple versions, all versions // must be able to resolve the field. Services map[string]bool }
FieldInfo holds federation-specific information for graphql.Fields used to plan and execute queries.
type MergeMode ¶
type MergeMode string
MergeMode controls how to combine two different schemas. Union is used for two independent services, Intersection for two different versions of the same service.
const ( // Union computes a schema that is supported by the two services combined. // // A Union is used to to combine the schema of two independent services. // The proxy will split a GraphQL query to ask each service the fields // it knows about. // // Two schemas must be compatible: Any overlapping types (eg. a field that // is implemented by both services, or two input types) must be compatible. // In practice, this means types must be identical except for non-nil // modifiers. // // XXX: take intersection on ENUM values to not confuse a service with a // type it doesn't support? Union MergeMode = "union" // Intersection computes a schema that is supported by both services. // // An Intersection is used to combine two schemas of different versions // of the same service. During a deploy, only of two versions might be // available, and so queries must be compatible with both schemas. // // Intersection computes a schema that can be executed by both services. // It only includes types and fields (etc.) exported by both services. // Overlapping types must be compatible as in a Union merge. // // One surprise might be that newly added ENUM values or UNION types might // be returned by the merged schema. Intersection MergeMode = "intersection" )
Click to show internal directories.
Click to hide internal directories.