- |- schema { query: QueryRoot } directive @onQuery on QUERY directive @onMutation on MUTATION directive @onSubscription on SUBSCRIPTION directive @onField on FIELD directive @onFragmentDefinition on FRAGMENT_DEFINITION directive @onFragmentSpread on FRAGMENT_SPREAD directive @onInlineFragment on INLINE_FRAGMENT directive @onSchema on SCHEMA directive @onScalar on SCALAR directive @onObject on OBJECT directive @onFieldDefinition on FIELD_DEFINITION directive @onArgumentDefinition on ARGUMENT_DEFINITION directive @onInterface on INTERFACE directive @onUnion on UNION directive @onEnum on ENUM directive @onEnumValue on ENUM_VALUE directive @onInputObject on INPUT_OBJECT directive @onInputFieldDefinition on INPUT_FIELD_DEFINITION type Alien implements Being & Intelligent { iq: Int name(surname: Boolean): String numEyes: Int } scalar Any interface Being { name(surname: Boolean): String } interface Canine { name(surname: Boolean): String } type Cat implements Being & Pet { name(surname: Boolean): String nickname: String meows: Boolean meowVolume: Int furColor: FurColor } union CatOrDog = Dog | Cat input ComplexInput { requiredField: Boolean! nonNullField: Boolean! = false intField: Int stringField: String booleanField: Boolean stringListField: [String] } type ComplicatedArgs { intArgField(intArg: Int): String nonNullIntArgField(nonNullIntArg: Int!): String stringArgField(stringArg: String): String booleanArgField(booleanArg: Boolean): String enumArgField(enumArg: FurColor): String floatArgField(floatArg: Float): String idArgField(idArg: ID): String stringListArgField(stringListArg: [String]): String stringListNonNullArgField(stringListNonNullArg: [String!]): String complexArgField(complexArg: ComplexInput): String multipleReqs(req1: Int!, req2: Int!): String nonNullFieldWithDefault(arg: Int! = 0): String multipleOpts(opt1: Int = 0, opt2: Int = 0): String multipleOptAndReq(req1: Int!, req2: Int!, opt1: Int = 0, opt2: Int = 0): String } type Dog implements Being & Pet & Canine { name(surname: Boolean): String nickname: String barkVolume: Int barks: Boolean doesKnowCommand(dogCommand: DogCommand): Boolean isHousetrained(atOtherHomes: Boolean = true): Boolean isAtLocation(x: Int, y: Int): Boolean } enum DogCommand { SIT HEEL DOWN } union DogOrHuman = Dog | Human enum FurColor { BROWN BLACK TAN SPOTTED NO_FUR UNKNOWN } type Human implements Being & Intelligent { name(surname: Boolean): String pets: [Pet] relatives: [Human] iq: Int } union HumanOrAlien = Human | Alien interface Intelligent { iq: Int } scalar Invalid interface Pet { name(surname: Boolean): String } type QueryRoot { human(id: ID): Human alien: Alien dog: Dog cat: Cat pet: Pet catOrDog: CatOrDog dogOrHuman: DogOrHuman humanOrAlien: HumanOrAlien complicatedArgs: ComplicatedArgs invalidArg(arg: Invalid): String anyArg(arg: Any): String } # injected becuase upstream spec is missing some types extend type QueryRoot { field: T f1: Type f2: Type f3: Type } type Type { a: String b: String c: String } type T { a: String b: String c: String d: String y: String deepField: T deeperField: T } - | schema { query: QueryRoot } type Connection { edges: [Edge] } type Edge { node: Node } type IntBox implements SomeBox { scalar: Int deepBox: IntBox unrelatedField: String listStringBox: [StringBox] stringBox: StringBox intBox: IntBox } type Node { id: ID name: String } interface NonNullStringBox1 { scalar: String! } type NonNullStringBox1Impl implements SomeBox & NonNullStringBox1 { scalar: String! unrelatedField: String deepBox: SomeBox } interface NonNullStringBox2 { scalar: String! } type NonNullStringBox2Impl implements SomeBox & NonNullStringBox2 { scalar: String! unrelatedField: String deepBox: SomeBox } type QueryRoot { someBox: SomeBox connection: Connection } interface SomeBox { deepBox: SomeBox unrelatedField: String } type StringBox implements SomeBox { scalar: String deepBox: StringBox unrelatedField: String listStringBox: [StringBox] stringBox: StringBox intBox: IntBox } - | type Foo { constructor: String } type Query { foo: Foo }