enums

Contents

Add custom GraphQL enums

Usage

Add enum definitions to the enums property returned by your extension function. Each enum has a description and a map of names to values.

import type {Extensions, GraphQL} from '@enonic-types/guillotine';

export const extensions = (graphQL: GraphQL): Extensions => {
    return {
        enums: {
            CustomEnum: {
                description: "Custom Enum",
                values: {
                    a: "A",
                    b: "B",
                }
            }
        }
    };
};

Contents

Contents