forked from zyedidia/micro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
graphql.yaml
47 lines (33 loc) · 1.15 KB
/
graphql.yaml
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
filetype: graphql
detect:
filename: "\\.(gql|graphql)$"
rules:
- type: "\\b(?:(query|mutation|subscription|type|input|scalar|fragment|schema|union|on|extends?))\\b"
# scalar types
- statement: "\\b(ID|Int|Float|Boolean|String|Datetime|Null)\\b"
# introspection types
- statement: "(__\\w+)"
# parameters
- statement: "((\\w+)(?:\\:([\\s]*)?)(?:\\$))"
# directive locations
- statement: "\\b(QUERY|MUTATION|SUBSCRIPTION|FIELD|FRAGMENT_DEFINITION|FRAGMENT_SPREAD|INLINE_FRAGMENT|SCHEMA|SCALAR|OBJECT|FIELD_DEFINITION|ARGUMENT_DEFINITION|INTERFACE|UNION|ENUM|ENUM_VALUE|INPUT_OBJECT|INPUT_FIELD_DEFINITION)\\b"
# directives
- constant: "(@\\w+)"
# root types
- constant: "\\b(Query|Mutation|Subscription|Schema|Root)\\b"
# variables
- special: "(\\$\\w+)"
# required symbol
- special: "(!)"
- symbol: "(:|=|\\||\\(|\\)|\\{|\\}|\\[|\\])"
- constant.bool: "\\b(true|false)\\b"
- constant.string:
start: "\""
end: "\""
skip: "\\\\."
rules:
- constant.specialChar: "\\\\."
- comment:
start: "#"
end: "$"
rules: []