File: graphql.yaml

package info (click to toggle)
micro 2.0.15-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 2,828 kB
  • sloc: sh: 247; makefile: 77; xml: 53
file content (47 lines) | stat: -rw-r--r-- 1,177 bytes parent folder | download | duplicates (3)
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: []