github.com/fortexxx/gqlgen@v0.10.3-0.20191216030626-ca5ea8b21ead/codegen/testserver/interfaces.graphql (about)

     1  extend type Query {
     2      shapes: [Shape]
     3      noShape: Shape @makeNil
     4      noShapeTypedNil: Shape @makeTypedNil
     5      animal: Animal @makeTypedNil
     6  }
     7  
     8  interface Animal {
     9      species: String!
    10  }
    11  
    12  type Dog implements Animal {
    13      species: String!
    14      dogBreed: String!
    15  }
    16  
    17  type Cat implements Animal {
    18      species: String!
    19      catBreed: String!
    20  }
    21  
    22  interface Shape {
    23      area: Float
    24  }
    25  type Circle implements Shape {
    26      radius: Float
    27      area: Float
    28  }
    29  type Rectangle implements Shape {
    30      length: Float
    31      width: Float
    32      area: Float
    33  }
    34  union ShapeUnion @goModel(model:"testserver.ShapeUnion") = Circle | Rectangle
    35  
    36  directive @makeNil on FIELD_DEFINITION
    37  directive @makeTypedNil on FIELD_DEFINITION