git.sr.ht/~sircmpwn/gqlgen@v0.0.0-20200522192042-c84d29a1c940/codegen/testserver/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  interface Shape {
    31      area: Float
    32  }
    33  type Circle implements Shape {
    34      radius: Float
    35      area: Float
    36  }
    37  type Rectangle implements Shape {
    38      length: Float
    39      width: Float
    40      area: Float
    41  }
    42  union ShapeUnion @goModel(model:"testserver.ShapeUnion") = Circle | Rectangle
    43  
    44  directive @makeNil on FIELD_DEFINITION
    45  directive @makeTypedNil on FIELD_DEFINITION
    46  
    47  interface Node {
    48      id: ID!
    49      child: Node!
    50  }
    51  
    52  type ConcreteNodeA implements Node {
    53      id: ID!
    54      child: Node!
    55      name: String!
    56  }
    57  
    58  """ Implements the Node interface with another interface """
    59  type ConcreteNodeInterface implements Node {
    60      id: ID!
    61      child: Node!
    62  }