github.com/operandinc/gqlgen@v0.16.1/codegen/testserver/followschema/interfaces.graphql (about)

     1  extend type Query {
     2      shapes: [Shape]
     3      noShape: Shape @makeNil
     4      node: Node!
     5      noShapeTypedNil: Shape @makeTypedNil
     6      animal: Animal @makeTypedNil
     7      notAnInterface: BackedByInterface
     8  }
     9  
    10  interface Animal {
    11      species: String!
    12  }
    13  
    14  type BackedByInterface {
    15      id: String!
    16      thisShouldBind: String!
    17      thisShouldBindWithError: String!
    18  }
    19  
    20  type Dog implements Animal {
    21      species: String!
    22      dogBreed: String!
    23  }
    24  
    25  type Cat implements Animal {
    26      species: String!
    27      catBreed: String!
    28  }
    29  
    30  type Coordinates {
    31      x: Float!
    32      y: Float!
    33  }
    34  interface Shape {
    35      area: Float
    36      coordinates: Coordinates
    37  }
    38  
    39  type Circle implements Shape {
    40      radius: Float
    41      area: Float
    42      coordinates: Coordinates
    43  }
    44  type Rectangle implements Shape {
    45      length: Float
    46      width: Float
    47      area: Float
    48      coordinates: Coordinates
    49  }
    50  union ShapeUnion @goModel(model: "followschema.ShapeUnion") = Circle | Rectangle
    51  
    52  directive @makeNil on FIELD_DEFINITION
    53  directive @makeTypedNil on FIELD_DEFINITION
    54  
    55  interface Node {
    56      id: ID!
    57      child: Node!
    58  }
    59  
    60  type ConcreteNodeA implements Node {
    61      id: ID!
    62      child: Node!
    63      name: String!
    64  }
    65  
    66  " Implements the Node interface with another interface "
    67  type ConcreteNodeInterface implements Node {
    68      id: ID!
    69      child: Node!
    70  }