unions
Contents
Used to create custom unions
Usage
It must be an object with the following structure:
unions: {
<UnionTypeName>: {
description: <description>,
types: [
<graphQLType>,
// the rest of types or reference to type ...
],
},
// the rest of union definitions ...
}
For example:
unions: {
CustomUnion: {
description: "Custom Union",
types: [
graphQL.reference('GraphQLTypeNameOne'),
graphQL.reference('GraphQLTypeNameTwo'),
]
}
}