1 | Prism.languages.graphql = {
|
2 | 'comment': /#.*/,
|
3 | 'string': {
|
4 | pattern: /"(?:\\.|[^\\"\r\n])*"/,
|
5 | greedy: true
|
6 | },
|
7 | 'number': /(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,
|
8 | 'boolean': /\b(?:true|false)\b/,
|
9 | 'variable': /\$[a-z_]\w*/i,
|
10 | 'directive': {
|
11 | pattern: /@[a-z_]\w*/i,
|
12 | alias: 'function'
|
13 | },
|
14 | 'attr-name': /[a-z_]\w*(?=\s*:)/i,
|
15 | 'keyword': [
|
16 | {
|
17 | pattern: /(fragment\s+(?!on)[a-z_]\w*\s+|\.{3}\s*)on\b/,
|
18 | lookbehind: true
|
19 | },
|
20 | /\b(?:query|fragment|mutation)\b/
|
21 | ],
|
22 | 'operator': /!|=|\.{3}/,
|
23 | 'punctuation': /[!(){}\[\]:=,]/
|
24 | }; |
\ | No newline at end of file |