-
-
Notifications
You must be signed in to change notification settings - Fork 85
/
graphql-sdl.scroll
49 lines (44 loc) · 948 Bytes
/
graphql-sdl.scroll
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import ../code/conceptPage.scroll
id graphql-sdl
name GraphQL Schema Definition Language
appeared 2018
tags idl
conceptDescription A type definition syntax to the GraphQL specification.
country Various
originCommunity https://github.com/graphql/
reference https://github.com/graphql/graphql-spec/pull/90
example
# 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
}
lineCommentToken #
lineCommentToken “””
hasComments true
hasMultiLineComments false
hasLineComments true
“”” A comment
hasSemanticIndentation false