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 union definitions ...
}

For example:

unions: {
    CustomUnion: {
        description: "Custom Union",
        types: [
            graphQL.reference('GraphQLTypeNameOne'),
            graphQL.reference('GraphQLTypeNameTwo'),
        ]
    }
}

Contents

Contents