packages feed

morpheus-graphql-0.4.0: examples/Sophisticated/api.gql

# for Input Union

input Cat {
  name: String!
}

input Dog {
  name: String!
}

input Bird {
  name: String!
}

# Main APi

enum CityID {
  Paris
  BLN
  HH
}

input Coordinates {
  latitude: Euro!
  longitude: [[[UniqueID!]!]]!
}

input UniqueID {
  type: String,
  id: String!
}

type Address {
  city: String!
  street: String!
  houseNumber: Int!
}

type User {
  name: String!
  email: String!
  address(coordinates: Coordinates!, comment: String): Address!
  office(zipCode: [[[ID!]]!], id: CityID!): Address!
  entity: MyUnion!
  home: CityID!
}

union MyUnion = User | Address

type Query {
  user: User!
  animal(animal: Animal): String!
  wrapped1(type: UniqueID): AIntText!
  wrapped2: AText!
  set: SetInt!
  map: MapTextInt!
}

type Mutation {
  createUser: User!
  createAddress: Address!
}

type Subscription {
  newAddress: Address!
  newUser: User!
}