...

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

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

     1- |-
     2  schema {
     3    query: QueryRoot
     4  }
     5
     6  directive @onField on FIELD
     7
     8  interface Mammal {
     9    mother: Mammal
    10    father: Mammal
    11  }
    12
    13  interface Pet {
    14    name(surname: Boolean): String
    15  }
    16
    17  interface Canine implements Mammal {
    18    name(surname: Boolean): String
    19    mother: Canine
    20    father: Canine
    21  }
    22
    23  enum DogCommand {
    24    SIT
    25    HEEL
    26    DOWN
    27  }
    28
    29  type Dog implements Pet & Mammal & Canine {
    30    name(surname: Boolean): String
    31    nickname: String
    32    barkVolume: Int
    33    barks: Boolean
    34    doesKnowCommand(dogCommand: DogCommand): Boolean
    35    isHouseTrained(atOtherHomes: Boolean = true): Boolean
    36    isAtLocation(x: Int, y: Int): Boolean
    37    mother: Dog
    38    father: Dog
    39  }
    40
    41  type Cat implements Pet {
    42    name(surname: Boolean): String
    43    nickname: String
    44    meows: Boolean
    45    meowsVolume: Int
    46    furColor: FurColor
    47  }
    48
    49  union CatOrDog = Cat | Dog
    50
    51  type Human {
    52    name(surname: Boolean): String
    53    pets: [Pet]
    54    relatives: [Human]
    55  }
    56
    57  enum FurColor {
    58    BROWN
    59    BLACK
    60    TAN
    61    SPOTTED
    62    NO_FUR
    63    UNKNOWN
    64  }
    65
    66  input ComplexInput {
    67    requiredField: Boolean!
    68    nonNullField: Boolean! = false
    69    intField: Int
    70    stringField: String
    71    booleanField: Boolean
    72    stringListField: [String]
    73  }
    74
    75  type ComplicatedArgs {
    76    intArgField(intArg: Int): String
    77    nonNullIntArgField(nonNullIntArg: Int!): String
    78    stringArgField(stringArg: String): String
    79    booleanArgField(booleanArg: Boolean): String
    80    enumArgField(enumArg: FurColor): String
    81    floatArgField(floatArg: Float): String
    82    idArgField(idArg: ID): String
    83    stringListArgField(stringListArg: [String]): String
    84    stringListNonNullArgField(stringListNonNullArg: [String!]): String
    85    complexArgField(complexArg: ComplexInput): String
    86    multipleReqs(req1: Int!, req2: Int!): String
    87    nonNullFieldWithDefault(arg: Int! = 0): String
    88    multipleOpts(opt1: Int = 0, opt2: Int = 0): String
    89    multipleOptAndReq(req1: Int!, req2: Int!, opt1: Int = 0, opt2: Int = 0): String
    90  }
    91
    92  type QueryRoot {
    93    human(id: ID): Human
    94    dog: Dog
    95    cat: Cat
    96    pet: Pet
    97    catOrDog: CatOrDog
    98    complicatedArgs: ComplicatedArgs
    99  }
   100  # injected becuase upstream spec is missing some types
   101  extend type QueryRoot {
   102      field: T
   103      f1: Type
   104      f2: Type
   105      f3: Type
   106  }
   107
   108  type Type {
   109      a: String
   110      b: String
   111      c: String
   112  }
   113  type T {
   114      a: String
   115      b: String
   116      c: String
   117      d: String
   118      y: String
   119      deepField: T
   120      deeperField: T
   121  }
   122- |-
   123  interface Pet {
   124    name: String
   125  }
   126
   127  type Dog implements Pet {
   128    name: String
   129    nickname: String
   130    barkVolume: Int
   131  }
   132
   133  type Cat implements Pet {
   134    name: String
   135    nickname: String
   136    meowVolume: Int
   137  }
   138
   139  union CatOrDog = Cat | Dog
   140
   141  type Human {
   142    name: String
   143    pets: [Pet]
   144  }
   145
   146  type Query {
   147    human: Human
   148  }
   149- |-
   150  directive @onQuery on QUERY
   151
   152  directive @onMutation on MUTATION
   153
   154  directive @onSubscription on SUBSCRIPTION
   155
   156  directive @onField on FIELD
   157
   158  directive @onFragmentDefinition on FRAGMENT_DEFINITION
   159
   160  directive @onFragmentSpread on FRAGMENT_SPREAD
   161
   162  directive @onInlineFragment on INLINE_FRAGMENT
   163
   164  directive @onVariableDefinition on VARIABLE_DEFINITION
   165
   166  type Query {
   167    dummy: String
   168  }
   169- |-
   170  type Query {
   171    foo: String
   172  }
   173- |-
   174  type Query {
   175    normalField: String
   176    deprecatedField: String @deprecated(reason: "Some field reason.")
   177  }
   178- |-
   179  type Query {
   180    someField(normalArg: String, deprecatedArg: String @deprecated(reason: "Some arg reason.")): String
   181  }
   182- |-
   183  directive @someDirective(normalArg: String, deprecatedArg: String @deprecated(reason: "Some arg reason.")) on FIELD
   184
   185  type Query {
   186    someField: String
   187  }
   188- |-
   189  directive @someDirective(someArg: InputType) on FIELD
   190
   191  input InputType {
   192    normalField: String
   193    deprecatedField: String @deprecated(reason: "Some input field reason.")
   194  }
   195
   196  type Query {
   197    someField(someArg: InputType): String
   198  }
   199- |-
   200  enum EnumType {
   201    NORMAL_VALUE
   202    DEPRECATED_VALUE @deprecated(reason: "Some enum reason.")
   203  }
   204
   205  type Query {
   206    someField(enumArg: EnumType): String
   207  }
   208- |-
   209  type Query {
   210    someQuery: SomeType
   211  }
   212
   213  type SomeType {
   214    someField: String
   215    introspectionField: __EnumValue
   216  }
   217- |-
   218  type Query {
   219    someField(a: String, b: String): String
   220  }
   221- |-
   222  input SomeInput {
   223    a: String
   224    b: String
   225  }
   226
   227  type Query {
   228    someField(arg: SomeInput): String
   229  }
   230- |-
   231  interface SomeBox {
   232    deepBox: SomeBox
   233    unrelatedField: String
   234  }
   235
   236  type StringBox implements SomeBox {
   237    scalar: String
   238    deepBox: StringBox
   239    unrelatedField: String
   240    listStringBox: [StringBox]
   241    stringBox: StringBox
   242    intBox: IntBox
   243  }
   244
   245  type IntBox implements SomeBox {
   246    scalar: Int
   247    deepBox: IntBox
   248    unrelatedField: String
   249    listStringBox: [StringBox]
   250    stringBox: StringBox
   251    intBox: IntBox
   252  }
   253
   254  interface NonNullStringBox1 {
   255    scalar: String!
   256  }
   257
   258  type NonNullStringBox1Impl implements SomeBox & NonNullStringBox1 {
   259    scalar: String!
   260    unrelatedField: String
   261    deepBox: SomeBox
   262  }
   263
   264  interface NonNullStringBox2 {
   265    scalar: String!
   266  }
   267
   268  type NonNullStringBox2Impl implements SomeBox & NonNullStringBox2 {
   269    scalar: String!
   270    unrelatedField: String
   271    deepBox: SomeBox
   272  }
   273
   274  type Connection {
   275    edges: [Edge]
   276  }
   277
   278  type Edge {
   279    node: Node
   280  }
   281
   282  type Node {
   283    id: ID
   284    name: String
   285  }
   286
   287  type Query {
   288    someBox: SomeBox
   289    connection: Connection
   290  }
   291- |-
   292  type Foo {
   293    constructor: String
   294  }
   295
   296  type Query {
   297    foo: Foo
   298  }
   299- |-
   300  interface Being {
   301    name: String
   302  }
   303
   304  interface Pet implements Being {
   305    name: String
   306  }
   307
   308  type Dog implements Being & Pet {
   309    name: String
   310    barkVolume: Int
   311  }
   312
   313  type Cat implements Being & Pet {
   314    name: String
   315    meowVolume: Int
   316  }
   317
   318  union CatOrDog = Cat | Dog
   319
   320  interface Intelligent {
   321    iq: Int
   322  }
   323
   324  type Human implements Being & Intelligent {
   325    name: String
   326    pets: [Pet]
   327    iq: Int
   328  }
   329
   330  type Alien implements Being & Intelligent {
   331    name: String
   332    iq: Int
   333  }
   334
   335  union DogOrHuman = Dog | Human
   336
   337  union HumanOrAlien = Human | Alien
   338
   339  type Query {
   340    catOrDog: CatOrDog
   341    dogOrHuman: DogOrHuman
   342    humanOrAlien: HumanOrAlien
   343  }
   344- |-
   345  schema {
   346    query: QueryRoot
   347    subscription: SubscriptionRoot
   348  }
   349
   350  type Message {
   351    body: String
   352    sender: String
   353  }
   354
   355  type SubscriptionRoot {
   356    importantEmails: [String]
   357    notImportantEmails: [String]
   358    moreImportantEmails: [String]
   359    spamEmails: [String]
   360    deletedEmails: [String]
   361    newMessage: Message
   362  }
   363
   364  type QueryRoot {
   365    dummy: String
   366  }
   367- |-
   368  type Query {
   369    dummy: String
   370  }
   371- |-
   372  schema {
   373    query: QueryRoot
   374  }
   375
   376  directive @onField on FIELD
   377
   378  directive @directive on FIELD | FRAGMENT_DEFINITION
   379
   380  directive @directiveA on FIELD | FRAGMENT_DEFINITION
   381
   382  directive @directiveB on FIELD | FRAGMENT_DEFINITION
   383
   384  directive @repeatable repeatable on FIELD | FRAGMENT_DEFINITION
   385
   386  interface Mammal {
   387    mother: Mammal
   388    father: Mammal
   389  }
   390
   391  interface Pet {
   392    name(surname: Boolean): String
   393  }
   394
   395  interface Canine implements Mammal {
   396    name(surname: Boolean): String
   397    mother: Canine
   398    father: Canine
   399  }
   400
   401  enum DogCommand {
   402    SIT
   403    HEEL
   404    DOWN
   405  }
   406
   407  type Dog implements Pet & Mammal & Canine {
   408    name(surname: Boolean): String
   409    nickname: String
   410    barkVolume: Int
   411    barks: Boolean
   412    doesKnowCommand(dogCommand: DogCommand): Boolean
   413    isHouseTrained(atOtherHomes: Boolean = true): Boolean
   414    isAtLocation(x: Int, y: Int): Boolean
   415    mother: Dog
   416    father: Dog
   417  }
   418
   419  type Cat implements Pet {
   420    name(surname: Boolean): String
   421    nickname: String
   422    meows: Boolean
   423    meowsVolume: Int
   424    furColor: FurColor
   425  }
   426
   427  union CatOrDog = Cat | Dog
   428
   429  type Human {
   430    name(surname: Boolean): String
   431    pets: [Pet]
   432    relatives: [Human]
   433  }
   434
   435  enum FurColor {
   436    BROWN
   437    BLACK
   438    TAN
   439    SPOTTED
   440    NO_FUR
   441    UNKNOWN
   442  }
   443
   444  input ComplexInput {
   445    requiredField: Boolean!
   446    nonNullField: Boolean! = false
   447    intField: Int
   448    stringField: String
   449    booleanField: Boolean
   450    stringListField: [String]
   451  }
   452
   453  type ComplicatedArgs {
   454    intArgField(intArg: Int): String
   455    nonNullIntArgField(nonNullIntArg: Int!): String
   456    stringArgField(stringArg: String): String
   457    booleanArgField(booleanArg: Boolean): String
   458    enumArgField(enumArg: FurColor): String
   459    floatArgField(floatArg: Float): String
   460    idArgField(idArg: ID): String
   461    stringListArgField(stringListArg: [String]): String
   462    stringListNonNullArgField(stringListNonNullArg: [String!]): String
   463    complexArgField(complexArg: ComplexInput): String
   464    multipleReqs(req1: Int!, req2: Int!): String
   465    nonNullFieldWithDefault(arg: Int! = 0): String
   466    multipleOpts(opt1: Int = 0, opt2: Int = 0): String
   467    multipleOptAndReq(req1: Int!, req2: Int!, opt1: Int = 0, opt2: Int = 0): String
   468  }
   469
   470  type QueryRoot {
   471    human(id: ID): Human
   472    dog: Dog
   473    cat: Cat
   474    pet: Pet
   475    catOrDog: CatOrDog
   476    complicatedArgs: ComplicatedArgs
   477  }
   478- |-
   479  type Query {
   480    invalidArg(arg: CustomScalar): String
   481  }
   482
   483  scalar CustomScalar
   484- |-
   485  type Query {
   486    anyArg(arg: Any): String
   487  }
   488
   489  scalar Any
   490- ""

View as plain text