enums

Contents

Add custom GraphQL enums

Usage

It must be an object with the following structure:

enums: {
    <EnumTypeName>: {
        description: <description>
        values: {
            <key1>: <value1>,
            <key2>: <value2>,
            // the rest of pairs of key and value ...
        },
    },
    // the rest of enum type definitions ...
}

For example:

enums: {
    CustomEnum: {
        description: "Custom Enum",
        values: {
            a: "A",
            b: "B",
        }
    }
}

Contents

Contents