interfaces
Contents
Add custom GraphQL interfaces
Usage
Add definitions to the interfaces property returned by your extension function. Each key is the name of a GraphQL type. This example references CustomFilterInput from Input types; include that definition in the same extension.
import type {Extensions, GraphQL} from '@enonic-types/guillotine';
export const extensions = (graphQL: GraphQL): Extensions => {
return {
interfaces: {
CustomInterface: {
description: "Custom Interface",
fields: {
query: {
type: graphQL.list(graphQL.GraphQLString),
args: {
filter: graphQL.reference('CustomFilterInput')
}
}
},
}
}
};
};