GraphQL Schema Definition Language is an actively used query language created in 2018. A type definition syntax to the GraphQL specification.

2Years Old ?Users ?Jobs
  • GraphQL Schema Definition Language first appeared in 2018
  • Have a question about GraphQL Schema Definition Language not answered here? Email me and let me know how I can help.

Example code from the web:

# Enumeration type for a level of priority
enum Priority {
  LOW
  MEDIUM
  HIGH
}
# Our main todo type
type Todo {
  id: ID!
  name: String!
  description: String
  priority: Priority!
}
type Query {
  # Get one todo item
  todo(id: ID!): Todo
  # Get all todo items
  allTodos: [Todo!]!
}
type Mutation {
  addTodo(name: String!, priority: Priority = LOW): Todo!
  removeTodo(id: ID!): Todo!
}
schema {
  query: Query
  mutation: Mutation
}

Last updated February 18th, 2020

Edit GraphQL Schema Definition Language on GitHub