graphgate-validation 0.5.0

GraphGate is Apollo Federation implemented in Rust
Documentation
input TestInput {
    id: Int!
    name: Int!
}

enum DogCommand {
    SIT
    HEEL
    DOWN
}

type Dog implements Pet & Being & 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 FurColor {
    BROWN
    BLACK
    TAN
    SPOTTED
}

type Cat implements Pet & Being {
    name(surname: Boolean): String
    nickname: String
    meows: Boolean
    meowVolume: Int
    furColor: FurColor
}

union CatOrDog = Cat | Dog

type Human implements Being & Intelligent {
    name(surname: Boolean): String
    pets: [Pet]
    relatives: [Human]
    iq: Int
}

type Alien implements Being & Intelligent {
    name(surname: Boolean): String
    iq: Int
    numEyes: Int
}

union DogOrHuman = Dog | Human

union HumanOrAlien = Human | Alien

interface Being {
    name(surname: Boolean): String
}

interface Pet {
    name(surname: Boolean): String
}

interface Canine {
    name(surname: Boolean): String
}

interface Intelligent {
    iq: Int
}

input ComplexInput {
    requiredField: Boolean!
    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
    complexArgField(complexArg: ComplexInput): String
    multipleReqs(req1: Int!, req2: Int!): String
    multipleOpts(opt1: Int! = 0, opt2: Int! = 0): String
    multipleOptAndReq(req1: Int!, req2: Int!, opt1: Int! = 0, opt2: Int! = 0): String
}

type Query {
    human(id: ID): Human
    alien: Alien
    dog: Dog
    cat: Cat
    pet: Pet
    being: Being
    intelligent: Intelligent
    catOrDog: CatOrDog
    dogOrHuman: DogOrHuman
    humanOrAlien: HumanOrAlien
    complicatedArgs: ComplicatedArgs
}

type Mutation {
    testInput(input: TestInput! = {id: 0, name: 0}): Int
}

schema {
    query: Query
    mutation: Mutation
}