Skip to content

Commit

Permalink
Update test and add new “after” variable case
Browse files Browse the repository at this point in the history
  • Loading branch information
kitten committed Mar 2, 2024
1 parent d1bf2b6 commit 562499c
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 38 deletions.
4 changes: 4 additions & 0 deletions packages/vscode-graphql-syntax/tests/__fixtures__/test.js
Expand Up @@ -37,13 +37,17 @@ const graphql = graphql(`
}
`);

const after1 = 'after';

const graphql = graphql(
`
query($id: ID!) { test }
`,
[var1, var2]
);

const after2 = 'after';

const query = /* GraphQL */ 'query { id } ';
const query = graphql('query($id: ID!) { id } ');
const query = graphql(
Expand Down
Expand Up @@ -108,9 +108,10 @@ something | meta.embedded.block.graphql meta.select
\` | punctuation.definition.string.template.end.js
; |
|
const graphql = graphql |
const graphql = |
graphql | entity.name.function.tagged-template.js
( |
\` | meta.embedded.block.graphql punctuation.definition.string.template.begin.js
\` | punctuation.definition.string.template.begin.js
| meta.embedded.block.graphql
""" | meta.embedded.block.graphql comment.line.graphql.js punctuation.whitespace.comment.leading.graphql
this is a comment | meta.embedded.block.graphql comment.line.graphql.js
Expand Down Expand Up @@ -145,14 +146,17 @@ something | meta.embedded.block.graphql meta.select
} | meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql punctuation.operation.graphql
| meta.embedded.block.graphql meta.selectionset.graphql
} | meta.embedded.block.graphql meta.selectionset.graphql punctuation.operation.graphql
\` | meta.embedded.block.graphql punctuation.definition.string.template.end.js
\` | punctuation.definition.string.template.end.js
) |
; |
|
const graphql = graphql |
const after1 = 'after'; |
|
const graphql = |
graphql | entity.name.function.tagged-template.js
( |
| meta.embedded.block.graphql
\` | meta.embedded.block.graphql punctuation.definition.string.template.begin.js
|
\` | punctuation.definition.string.template.begin.js
| meta.embedded.block.graphql
query | meta.embedded.block.graphql keyword.operation.graphql
( | meta.embedded.block.graphql meta.brace.round.graphql
Expand All @@ -169,12 +173,14 @@ test | meta.embedded.block.graphql meta.select
| meta.embedded.block.graphql meta.selectionset.graphql
} | meta.embedded.block.graphql meta.selectionset.graphql punctuation.operation.graphql
| meta.embedded.block.graphql
\` | meta.embedded.block.graphql punctuation.definition.string.template.end.js
, | meta.embedded.block.graphql
[var1, var2] | meta.embedded.block.graphql
\` | punctuation.definition.string.template.end.js
, |
[var1, var2] |
) |
; |
|
const after2 = 'after'; |
|
const query = |
|
/* GraphQL */ | comment.graphql.js
Expand All @@ -190,9 +196,10 @@ id | meta.embedded.block.graphql meta.select
| meta.embedded.block.graphql
' | punctuation.definition.string.template.end.js
; |
const query = graphql |
const query = |
graphql | entity.name.function.tagged-template.js
( |
' | meta.embedded.block.graphql punctuation.definition.string.template.begin.js
' | punctuation.definition.string.template.begin.js
query | meta.embedded.block.graphql keyword.operation.graphql
( | meta.embedded.block.graphql meta.brace.round.graphql
$id | meta.embedded.block.graphql meta.variables.graphql variable.parameter.graphql
Expand All @@ -208,13 +215,14 @@ id | meta.embedded.block.graphql meta.select
| meta.embedded.block.graphql meta.selectionset.graphql
} | meta.embedded.block.graphql meta.selectionset.graphql punctuation.operation.graphql
| meta.embedded.block.graphql
' | meta.embedded.block.graphql punctuation.definition.string.template.end.js
' | punctuation.definition.string.template.end.js
) |
; |
const query = graphql |
const query = |
graphql | entity.name.function.tagged-template.js
( |
| meta.embedded.block.graphql
' | meta.embedded.block.graphql punctuation.definition.string.template.begin.js
|
' | punctuation.definition.string.template.begin.js
query | meta.embedded.block.graphql keyword.operation.graphql
( | meta.embedded.block.graphql meta.brace.round.graphql
$id | meta.embedded.block.graphql meta.variables.graphql variable.parameter.graphql
Expand All @@ -229,7 +237,7 @@ ID | meta.embedded.block.graphql meta.variab
test | meta.embedded.block.graphql meta.selectionset.graphql variable.graphql
| meta.embedded.block.graphql meta.selectionset.graphql
} | meta.embedded.block.graphql meta.selectionset.graphql punctuation.operation.graphql
' | meta.embedded.block.graphql punctuation.definition.string.template.end.js
' | punctuation.definition.string.template.end.js
) |
; |
|
Expand Down Expand Up @@ -518,53 +526,57 @@ something | meta.embedded.block.graphql meta.selectionset.
\` | punctuation.definition.string.template.end.js
; |
|
const query = graphql<Generic> |
( |
' | meta.embedded.block.graphql punctuation.definition.string.template.begin.js
const query = |
graphql | entity.name.function.tagged-template.js
<Generic>( |
' | punctuation.definition.string.template.begin.js
query | meta.embedded.block.graphql keyword.operation.graphql
| meta.embedded.block.graphql meta.selectionset.graphql
{ | meta.embedded.block.graphql meta.selectionset.graphql punctuation.operation.graphql
| meta.embedded.block.graphql meta.selectionset.graphql
id | meta.embedded.block.graphql meta.selectionset.graphql variable.graphql
| meta.embedded.block.graphql meta.selectionset.graphql
} | meta.embedded.block.graphql meta.selectionset.graphql punctuation.operation.graphql
' | meta.embedded.block.graphql punctuation.definition.string.template.end.js
' | punctuation.definition.string.template.end.js
) |
; |
|
const query = graphql |
const query = |
graphql | entity.name.function.tagged-template.js
( |
| meta.embedded.block.graphql
' | meta.embedded.block.graphql punctuation.definition.string.template.begin.js
|
' | punctuation.definition.string.template.begin.js
query | meta.embedded.block.graphql keyword.operation.graphql
| meta.embedded.block.graphql meta.selectionset.graphql
{ | meta.embedded.block.graphql meta.selectionset.graphql punctuation.operation.graphql
| meta.embedded.block.graphql meta.selectionset.graphql
id | meta.embedded.block.graphql meta.selectionset.graphql variable.graphql
| meta.embedded.block.graphql meta.selectionset.graphql
} | meta.embedded.block.graphql meta.selectionset.graphql punctuation.operation.graphql
' | meta.embedded.block.graphql punctuation.definition.string.template.end.js
' | punctuation.definition.string.template.end.js
) |
; |
|
const query = graphql<Generic> |
( |
| meta.embedded.block.graphql
' | meta.embedded.block.graphql punctuation.definition.string.template.begin.js
const query = |
graphql | entity.name.function.tagged-template.js
<Generic>( |
|
' | punctuation.definition.string.template.begin.js
query | meta.embedded.block.graphql keyword.operation.graphql
| meta.embedded.block.graphql meta.selectionset.graphql
{ | meta.embedded.block.graphql meta.selectionset.graphql punctuation.operation.graphql
| meta.embedded.block.graphql meta.selectionset.graphql
id | meta.embedded.block.graphql meta.selectionset.graphql variable.graphql
| meta.embedded.block.graphql meta.selectionset.graphql
} | meta.embedded.block.graphql meta.selectionset.graphql punctuation.operation.graphql
' | meta.embedded.block.graphql punctuation.definition.string.template.end.js
' | punctuation.definition.string.template.end.js
) |
; |
|
const query = graphql |
const query = |
graphql | entity.name.function.tagged-template.js
( |
\` | meta.embedded.block.graphql punctuation.definition.string.template.begin.js
\` | punctuation.definition.string.template.begin.js
| meta.embedded.block.graphql
query | meta.embedded.block.graphql keyword.operation.graphql
| meta.embedded.block.graphql meta.selectionset.graphql
Expand All @@ -573,14 +585,15 @@ query | meta.embedded.block.graphql keyword.operation.
id | meta.embedded.block.graphql meta.selectionset.graphql variable.graphql
| meta.embedded.block.graphql meta.selectionset.graphql
} | meta.embedded.block.graphql meta.selectionset.graphql punctuation.operation.graphql
\` | meta.embedded.block.graphql punctuation.definition.string.template.end.js
\` | punctuation.definition.string.template.end.js
) |
; |
|
const query = graphql |
const query = |
graphql | entity.name.function.tagged-template.js
( |
| meta.embedded.block.graphql
\` | meta.embedded.block.graphql punctuation.definition.string.template.begin.js
|
\` | punctuation.definition.string.template.begin.js
| meta.embedded.block.graphql
query | meta.embedded.block.graphql keyword.operation.graphql
| meta.embedded.block.graphql meta.selectionset.graphql
Expand All @@ -590,9 +603,9 @@ id | meta.embedded.block.graphql meta.selectionset.
| meta.embedded.block.graphql meta.selectionset.graphql
} | meta.embedded.block.graphql meta.selectionset.graphql punctuation.operation.graphql
| meta.embedded.block.graphql
\` | meta.embedded.block.graphql punctuation.definition.string.template.end.js
, | meta.embedded.block.graphql
[var1, var2] | meta.embedded.block.graphql
\` | punctuation.definition.string.template.end.js
, |
[var1, var2] |
) |
; |
|
Expand Down

0 comments on commit 562499c

Please sign in to comment.