apollo-elements/apollo-elements

View on GitHub
test/graphql/test.schema.graphql

Summary

Maintainability
Test Coverage
type Message {
  message: String
  user: String
  date: String
}

type NonNull {
  nonNull: String!
}

type Nullable {
  nullable: String
}

type NoParam {
  noParam: String
}

type HelloWorld {
  name: String
  greeting: String
}

type User {
  username: String
  haircolor: String
  nickname: String
}

type Paged {
  pages: [Int]
}

type Query {
  messages: [Message]
  nonNullParam(nonNull: String!): NonNull
  nullableParam(nullable: String, delay: Int): Nullable
  noParam: NoParam
  helloWorld(name: String, greeting: String): HelloWorld
  pages(offset: Int, limit: Int): [Int]
}

type Subscription {
  messageSent: Message
  pageAdded: Int
  nullableParam(nullable: String, delay: Int): Nullable
  nonNullParam(nonNull: String!): NonNull
  noParam: NoParam
}

type Mutation {
  sendMessage(user: String, message: String): Message
  inputParam(input: ABInput): AB
  nonNullableParam(nonNull: String!): NonNull
  nullableParam(nullable: String, delay: Int): Nullable
  noParam: NoParam
  reset: [Message]
  updateUser(username: String!, haircolor: String!): User
}

input ABInput {
  a: String
  b: String
}

type AB {
  a: String
  b: String
}