...

Text file src/github.com/vektah/gqlparser/validator/imported/spec/schemas.yml

Documentation: github.com/vektah/gqlparser/validator/imported/spec

     1- |-
     2  schema {
     3    query: QueryRoot
     4  }
     5
     6  directive @onQuery on QUERY
     7
     8  directive @onMutation on MUTATION
     9
    10  directive @onSubscription on SUBSCRIPTION
    11
    12  directive @onField on FIELD
    13
    14  directive @onFragmentDefinition on FRAGMENT_DEFINITION
    15
    16  directive @onFragmentSpread on FRAGMENT_SPREAD
    17
    18  directive @onInlineFragment on INLINE_FRAGMENT
    19
    20  directive @onSchema on SCHEMA
    21
    22  directive @onScalar on SCALAR
    23
    24  directive @onObject on OBJECT
    25
    26  directive @onFieldDefinition on FIELD_DEFINITION
    27
    28  directive @onArgumentDefinition on ARGUMENT_DEFINITION
    29
    30  directive @onInterface on INTERFACE
    31
    32  directive @onUnion on UNION
    33
    34  directive @onEnum on ENUM
    35
    36  directive @onEnumValue on ENUM_VALUE
    37
    38  directive @onInputObject on INPUT_OBJECT
    39
    40  directive @onInputFieldDefinition on INPUT_FIELD_DEFINITION
    41
    42  type Alien implements Being & Intelligent {
    43    iq: Int
    44    name(surname: Boolean): String
    45    numEyes: Int
    46  }
    47
    48  scalar Any
    49
    50  interface Being {
    51    name(surname: Boolean): String
    52  }
    53
    54  interface Canine {
    55    name(surname: Boolean): String
    56  }
    57
    58  type Cat implements Being & Pet {
    59    name(surname: Boolean): String
    60    nickname: String
    61    meows: Boolean
    62    meowVolume: Int
    63    furColor: FurColor
    64  }
    65
    66  union CatOrDog = Dog | Cat
    67
    68  input ComplexInput {
    69    requiredField: Boolean!
    70    nonNullField: Boolean! = false
    71    intField: Int
    72    stringField: String
    73    booleanField: Boolean
    74    stringListField: [String]
    75  }
    76
    77  type ComplicatedArgs {
    78    intArgField(intArg: Int): String
    79    nonNullIntArgField(nonNullIntArg: Int!): String
    80    stringArgField(stringArg: String): String
    81    booleanArgField(booleanArg: Boolean): String
    82    enumArgField(enumArg: FurColor): String
    83    floatArgField(floatArg: Float): String
    84    idArgField(idArg: ID): String
    85    stringListArgField(stringListArg: [String]): String
    86    stringListNonNullArgField(stringListNonNullArg: [String!]): String
    87    complexArgField(complexArg: ComplexInput): String
    88    multipleReqs(req1: Int!, req2: Int!): String
    89    nonNullFieldWithDefault(arg: Int! = 0): String
    90    multipleOpts(opt1: Int = 0, opt2: Int = 0): String
    91    multipleOptAndReq(req1: Int!, req2: Int!, opt1: Int = 0, opt2: Int = 0): String
    92  }
    93
    94  type Dog implements Being & Pet & Canine {
    95    name(surname: Boolean): String
    96    nickname: String
    97    barkVolume: Int
    98    barks: Boolean
    99    doesKnowCommand(dogCommand: DogCommand): Boolean
   100    isHousetrained(atOtherHomes: Boolean = true): Boolean
   101    isAtLocation(x: Int, y: Int): Boolean
   102  }
   103
   104  enum DogCommand {
   105    SIT
   106    HEEL
   107    DOWN
   108  }
   109
   110  union DogOrHuman = Dog | Human
   111
   112  enum FurColor {
   113    BROWN
   114    BLACK
   115    TAN
   116    SPOTTED
   117    NO_FUR
   118    UNKNOWN
   119  }
   120
   121  type Human implements Being & Intelligent {
   122    name(surname: Boolean): String
   123    pets: [Pet]
   124    relatives: [Human]
   125    iq: Int
   126  }
   127
   128  union HumanOrAlien = Human | Alien
   129
   130  interface Intelligent {
   131    iq: Int
   132  }
   133
   134  scalar Invalid
   135
   136  interface Pet {
   137    name(surname: Boolean): String
   138  }
   139
   140  type QueryRoot {
   141    human(id: ID): Human
   142    alien: Alien
   143    dog: Dog
   144    cat: Cat
   145    pet: Pet
   146    catOrDog: CatOrDog
   147    dogOrHuman: DogOrHuman
   148    humanOrAlien: HumanOrAlien
   149    complicatedArgs: ComplicatedArgs
   150    invalidArg(arg: Invalid): String
   151    anyArg(arg: Any): String
   152  }
   153
   154  # injected becuase upstream spec is missing some types  
   155  extend type QueryRoot {
   156      field: T
   157      f1: Type
   158      f2: Type
   159      f3: Type
   160  }
   161
   162  type Type {
   163      a: String
   164      b: String
   165      c: String
   166  }
   167  type T {
   168      a: String
   169      b: String
   170      c: String
   171      d: String
   172      y: String
   173      deepField: T
   174      deeperField: T
   175  }
   176- |
   177  schema {
   178    query: QueryRoot
   179  }
   180
   181  type Connection {
   182    edges: [Edge]
   183  }
   184
   185  type Edge {
   186    node: Node
   187  }
   188
   189  type IntBox implements SomeBox {
   190    scalar: Int
   191    deepBox: IntBox
   192    unrelatedField: String
   193    listStringBox: [StringBox]
   194    stringBox: StringBox
   195    intBox: IntBox
   196  }
   197
   198  type Node {
   199    id: ID
   200    name: String
   201  }
   202
   203  interface NonNullStringBox1 {
   204    scalar: String!
   205  }
   206
   207  type NonNullStringBox1Impl implements SomeBox & NonNullStringBox1 {
   208    scalar: String!
   209    unrelatedField: String
   210    deepBox: SomeBox
   211  }
   212
   213  interface NonNullStringBox2 {
   214    scalar: String!
   215  }
   216
   217  type NonNullStringBox2Impl implements SomeBox & NonNullStringBox2 {
   218    scalar: String!
   219    unrelatedField: String
   220    deepBox: SomeBox
   221  }
   222
   223  type QueryRoot {
   224    someBox: SomeBox
   225    connection: Connection
   226  }
   227
   228  interface SomeBox {
   229    deepBox: SomeBox
   230    unrelatedField: String
   231  }
   232
   233  type StringBox implements SomeBox {
   234    scalar: String
   235    deepBox: StringBox
   236    unrelatedField: String
   237    listStringBox: [StringBox]
   238    stringBox: StringBox
   239    intBox: IntBox
   240  }
   241- |
   242  type Foo {
   243    constructor: String
   244  }
   245
   246  type Query {
   247    foo: Foo
   248  }

View as plain text