File tree 7 files changed +222
-454
lines changed
packages/vscode-graphql-syntax
7 files changed +222
-454
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " vscode-graphql-syntax " : patch
3
+ " vscode-graphql " : patch
4
+ ---
5
+
6
+ Temporarily revert a syntax highlighting bugfix that caused more bugs
Original file line number Diff line number Diff line change 4
4
"patterns" : [
5
5
{
6
6
"contentName" : " meta.embedded.block.graphql" ,
7
- "begin" : " (?<=(?:(?:Relay\\ ??\\ .)QL|gql|graphql|graphql\\ .experimental)\\ s*(?:<.*>)?\\ s*)\\ (" ,
8
- "end" : " \\ )" ,
7
+ "begin" : " \\ s*+(?:(?:(Relay)\\ ??\\ .)(QL)|(gql|graphql|graphql\\ .experimental)|(/\\ * GraphQL \\ */))\\ s*\\ (?\\ s*(`|')" ,
8
+ "beginCaptures" : {
9
+ "1" : {
10
+ "name" : " variable.other.class.js"
11
+ },
12
+ "2" : {
13
+ "name" : " entity.name.function.tagged-template.js"
14
+ },
15
+ "3" : {
16
+ "name" : " entity.name.function.tagged-template.js"
17
+ },
18
+ "4" : {
19
+ "name" : " comment.graphql.js"
20
+ },
21
+ "5" : {
22
+ "name" : " punctuation.definition.string.template.begin.js"
23
+ }
24
+ },
25
+ "end" : " (`|')" ,
26
+ "endCaptures" : {
27
+ "0" : {
28
+ "name" : " punctuation.definition.string.template.end.js"
29
+ }
30
+ },
9
31
"patterns" : [
10
32
{
11
- "begin" : " (`|')" ,
12
- "end" : " (`|')" ,
13
- "beginCaptures" : {
14
- "0" : {
15
- "name" : " punctuation.definition.string.template.begin.js"
16
- }
17
- },
18
- "endCaptures" : {
19
- "0" : {
20
- "name" : " punctuation.definition.string.template.end.js"
21
- }
22
- },
23
- "patterns" : [
24
- {
25
- "include" : " source.graphql"
26
- }
27
- ]
33
+ "include" : " source.graphql"
28
34
}
29
35
]
30
36
},
31
37
{
32
38
"contentName" : " meta.embedded.block.graphql" ,
33
- "begin" : " \\ s*+(?:(?:(?:( Relay)\\ ??\\ .)(QL)|(gql|graphql|graphql\\ .experimental)\\ s*(?:<.*>)? \\ s*)|(/ \\ * GraphQL \\ */)) \\ s* (`|')" ,
39
+ "begin" : " \\ s*+(?:(?:(Relay)\\ ??\\ .)(QL)|(gql|graphql|graphql\\ .experimental)) \\ s*\\ (? \\ s*(?:<.*>) (`|')" ,
34
40
"beginCaptures" : {
35
41
"1" : {
36
42
"name" : " variable.other.class.js"
42
48
"name" : " entity.name.function.tagged-template.js"
43
49
},
44
50
"4" : {
45
- "name" : " comment.graphql.js"
46
- },
47
- "5" : {
48
51
"name" : " punctuation.definition.string.template.begin.js"
49
52
}
50
53
},
Original file line number Diff line number Diff line change @@ -26,50 +26,6 @@ const Component = () => {
26
26
};
27
27
```
28
28
29
- ``` js
30
- const variable = 1 ;
31
-
32
- const queryA = graphql (`
33
- query {
34
- something(arg: ${ variable} )
35
- }
36
- ` );
37
-
38
- const queryB = graphql (
39
- `
40
- query {
41
- something(arg: ${ variable} )
42
- }
43
- `
44
- );
45
-
46
- const queryC = graphql (
47
- ' query { something(arg: ${variable}) }'
48
- );
49
- ```
50
-
51
- ``` ts
52
- const variable: number = 1 ;
53
-
54
- const queryA = graphql (`
55
- query {
56
- something(arg: ${variable })
57
- }
58
- ` );
59
-
60
- const queryB = graphql (
61
- `
62
- query {
63
- something(arg: ${variable })
64
- }
65
- `
66
- );
67
-
68
- const queryC = graphql (
69
- ' query { something(arg: ${variable}) }'
70
- );
71
- ```
72
-
73
29
### svelte
74
30
75
31
``` svelte
Original file line number Diff line number Diff line change @@ -37,18 +37,8 @@ const graphql = graphql(`
37
37
}
38
38
` ) ;
39
39
40
- const graphql = graphql (
41
- `
42
- query($id: ID!) { test }
43
- ` ,
44
- [ var1 , var2 ]
45
- ) ;
46
-
47
40
const query = /* GraphQL */ 'query { id } ' ;
48
- const query = graphql ( 'query($id: ID!) { id } ' ) ;
49
- const query = graphql (
50
- 'query($id: ID!) { test }'
51
- ) ;
41
+ const query = graphql ( 'query { id } ' ) ;
52
42
53
43
const queryWithInlineComment = `#graphql
54
44
query {
@@ -69,6 +59,7 @@ const queryWithInlineComment = `#graphql
69
59
}
70
60
}
71
61
` ;
62
+ // TODO: fix this
72
63
const queryWithInlineComment = `
73
64
#graphql
74
65
query {
Original file line number Diff line number Diff line change @@ -25,27 +25,9 @@ const query = graphql<SomeGeneric>`
25
25
}
26
26
` ;
27
27
28
+ // TODO: Fix this
28
29
const query = graphql < Generic > ( 'query { id }' ) ;
29
30
30
- const query = graphql (
31
- 'query { id }'
32
- ) ;
33
-
34
- const query = graphql < Generic > (
35
- 'query { id }'
36
- ) ;
37
-
38
- const query = graphql ( `
39
- query { id }
40
- ` ) ;
41
-
42
- const query = graphql (
43
- `
44
- query { id }
45
- ` ,
46
- [ var1 , var2 ]
47
- ) ;
48
-
49
31
const queryWithInlineComment = `#graphql
50
32
query {
51
33
user(id: "5", name: boolean) {
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change @@ -107,50 +107,6 @@ graphql\` |
107
107
const Component = () => { |
108
108
return <div > </div >; |
109
109
} ; |
110
- \`\`\` |
111
- |
112
- \`\`\`js |
113
- const variable = 1; |
114
- |
115
- const queryA = graphql(\` |
116
- query { |
117
- something (arg : \$ {variable }) |
118
- } |
119
- \`); |
120
- |
121
- const queryB = graphql( |
122
- \` |
123
- query { |
124
- something (arg : \$ {variable }) |
125
- } |
126
- \` |
127
- ); |
128
- |
129
- const queryC = graphql( |
130
- 'query { something (arg : \$ {variable }) } ' |
131
- ); |
132
- \`\`\` |
133
- |
134
- \`\`\`ts |
135
- const variable: number = 1; |
136
- |
137
- const queryA = graphql(\` |
138
- query { |
139
- something (arg : \$ {variable }) |
140
- } |
141
- \`); |
142
- |
143
- const queryB = graphql( |
144
- \` |
145
- query { |
146
- something (arg : \$ {variable }) |
147
- } |
148
- \` |
149
- ); |
150
- |
151
- const queryC = graphql( |
152
- 'query { something (arg : \$ {variable }) } ' |
153
- ); |
154
110
\`\`\` |
155
111
|
156
112
### svelte |
You can’t perform that action at this time.
0 commit comments