interfaces
Contents
Add custom GraphQL interfaces
Usage
It must be an object with the following structure:
interfaces: {
<InterfaceTypeName>: {
description: <description>
fields: {
<fieldName>: {
type: <graphQLType>,
args: {
<argName>: <graphQLType>,
// the rest of arguments ...
}
},
// the rest of field definitions ...
},
},
// the rest of interface definitions ...
}
For example:
interfaces: {
CustomInterface: {
description: "Custom Interface",
fields: {
query: {
type: graphQL.list(graphQL.GraphQLString),
args: {
filter: graphQL.reference('CustomFilterInput')
}
}
},
}
}