Skip to main content


Adds a new GraphQL interface to the schema.

Until this bug is fixed, custom interfaces need to be defined in a separate file from where they're consumed.


  • name

Name of the interface type. If not specified, defaults to the name of the class.

  • description

Description of the interface. Will be added to the Schema and exposed in tools like GraphiQL or Playground.

export class ContactItem {
class: "ContactItem",
type: "ContactLabel",
label: ContactLabel;

class: "ContactItem",
type: GraphQLString,
description: string;

label: ContactLabel,
description: string,
) {
this.label = label;
this.description = description;

In this example, we add a new interface type ContactItem which has 2 fields: label, description.