diff --git a/.changeset/famous-games-begin.md b/.changeset/famous-games-begin.md new file mode 100644 index 00000000000..ae10f9af58d --- /dev/null +++ b/.changeset/famous-games-begin.md @@ -0,0 +1,5 @@ +--- +'vscode-graphql-syntax': patch +--- + +Fix TextMate grammar to support string literals that don’t immediately follow a function call's left-parenthesis (`(`). diff --git a/packages/vscode-graphql-syntax/grammars/graphql.js.json b/packages/vscode-graphql-syntax/grammars/graphql.js.json index 9c65649db9d..245be94eb77 100644 --- a/packages/vscode-graphql-syntax/grammars/graphql.js.json +++ b/packages/vscode-graphql-syntax/grammars/graphql.js.json @@ -3,8 +3,8 @@ "injectionSelector": "L:(meta.embedded.block.javascript | meta.embedded.block.typescript | source.js | source.ts | source.tsx | source.vue | source.svelte | source.astro) -source.graphql -inline.graphql -string -comment", "patterns": [ { - "contentName": "meta.embedded.block.graphql", - "begin": "\\s*+(?:(?:(Relay)\\??\\.)(QL)|(gql|graphql|graphql\\.experimental)|(/\\* GraphQL \\*/))\\s*\\(?\\s*(`|')", + "begin": "\\s*+(?:(Relay)\\??\\.)(QL)|(gql|graphql|graphql\\.experimental)\\s*(?:<.*>)?\\s*\\(", + "end": "\\)", "beginCaptures": { "1": { "name": "variable.other.class.js" @@ -14,29 +14,42 @@ }, "3": { "name": "entity.name.function.tagged-template.js" - }, - "4": { - "name": "comment.graphql.js" - }, - "5": { - "name": "punctuation.definition.string.template.begin.js" - } - }, - "end": "(`|')", - "endCaptures": { - "0": { - "name": "punctuation.definition.string.template.end.js" } }, "patterns": [ { - "include": "source.graphql" + "contentName": "meta.embedded.block.graphql", + "begin": "(`|')", + "end": "(`|')", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.template.begin.js" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.string.template.end.js" + } + }, + "patterns": [ + { + "include": "source.graphql" + } + ] + }, + { + "patterns": [ + { "include": "source.js" }, + { "include": "source.ts" }, + { "include": "source.js.jsx" }, + { "include": "source.tsx" } + ] } ] }, { "contentName": "meta.embedded.block.graphql", - "begin": "\\s*+(?:(?:(Relay)\\??\\.)(QL)|(gql|graphql|graphql\\.experimental))\\s*\\(?\\s*(?:<.*>)(`|')", + "begin": "\\s*+(?:(?:(?:(Relay)\\??\\.)(QL)|(gql|graphql|graphql\\.experimental)\\s*(?:<.*>)?\\s*)|(/\\* GraphQL \\*/))\\s*(`|')", "beginCaptures": { "1": { "name": "variable.other.class.js" @@ -48,6 +61,9 @@ "name": "entity.name.function.tagged-template.js" }, "4": { + "name": "comment.graphql.js" + }, + "5": { "name": "punctuation.definition.string.template.begin.js" } }, diff --git a/packages/vscode-graphql-syntax/tests/__fixtures__/test.js b/packages/vscode-graphql-syntax/tests/__fixtures__/test.js index 1112c7adbfa..dbf470ebe42 100644 --- a/packages/vscode-graphql-syntax/tests/__fixtures__/test.js +++ b/packages/vscode-graphql-syntax/tests/__fixtures__/test.js @@ -37,8 +37,22 @@ 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 } '); +const query = graphql('query($id: ID!) { id } '); +const query = graphql( + 'query($id: ID!) { test }' +); const queryWithInlineComment = `#graphql query { @@ -59,7 +73,6 @@ const queryWithInlineComment = `#graphql } } `; -// TODO: fix this const queryWithInlineComment = ` #graphql query { diff --git a/packages/vscode-graphql-syntax/tests/__fixtures__/test.ts b/packages/vscode-graphql-syntax/tests/__fixtures__/test.ts index b8e507901b6..5ae8cefaad3 100644 --- a/packages/vscode-graphql-syntax/tests/__fixtures__/test.ts +++ b/packages/vscode-graphql-syntax/tests/__fixtures__/test.ts @@ -25,9 +25,27 @@ const query = graphql` } `; -// TODO: Fix this const query = graphql('query { id }'); +const query = graphql( + 'query { id }' +); + +const query = graphql( + 'query { id }' +); + +const query = graphql(` + query { id } +`); + +const query = graphql( + ` + query { id } + `, + [var1, var2] +); + const queryWithInlineComment = `#graphql query { user(id: "5", name: boolean) { diff --git a/packages/vscode-graphql-syntax/tests/__snapshots__/js-grammar.spec.ts.snap b/packages/vscode-graphql-syntax/tests/__snapshots__/js-grammar.spec.ts.snap index 1be3ebd280f..12a88876f2a 100644 --- a/packages/vscode-graphql-syntax/tests/__snapshots__/js-grammar.spec.ts.snap +++ b/packages/vscode-graphql-syntax/tests/__snapshots__/js-grammar.spec.ts.snap @@ -109,7 +109,6 @@ something | meta.embedded.block.graphql meta.select ; | | const graphql = | - | graphql | entity.name.function.tagged-template.js ( | \` | punctuation.definition.string.template.begin.js @@ -148,7 +147,39 @@ something | meta.embedded.block.graphql meta.select | meta.embedded.block.graphql meta.selectionset.graphql } | meta.embedded.block.graphql meta.selectionset.graphql punctuation.operation.graphql \` | punctuation.definition.string.template.end.js -); | +) | +; | + | +const after1 = 'after'; | + | +const graphql = | +graphql | entity.name.function.tagged-template.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 +$id | meta.embedded.block.graphql meta.variables.graphql variable.parameter.graphql +: | meta.embedded.block.graphql meta.variables.graphql punctuation.colon.graphql + | meta.embedded.block.graphql meta.variables.graphql +ID | meta.embedded.block.graphql meta.variables.graphql support.type.builtin.graphql +! | meta.embedded.block.graphql meta.variables.graphql keyword.operator.nulltype.graphql +) | meta.embedded.block.graphql meta.brace.round.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 +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 +, | + [var1, var2] | +) | +; | + | +const after2 = 'after'; | | const query = | | @@ -166,11 +197,17 @@ id | meta.embedded.block.graphql meta.select ' | punctuation.definition.string.template.end.js ; | const query = | - | graphql | entity.name.function.tagged-template.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 +: | meta.embedded.block.graphql meta.variables.graphql punctuation.colon.graphql + | meta.embedded.block.graphql meta.variables.graphql +ID | meta.embedded.block.graphql meta.variables.graphql support.type.builtin.graphql +! | meta.embedded.block.graphql meta.variables.graphql keyword.operator.nulltype.graphql +) | meta.embedded.block.graphql meta.brace.round.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 @@ -179,7 +216,30 @@ id | meta.embedded.block.graphql meta.select } | meta.embedded.block.graphql meta.selectionset.graphql punctuation.operation.graphql | meta.embedded.block.graphql ' | punctuation.definition.string.template.end.js -); | +) | +; | +const query = | +graphql | entity.name.function.tagged-template.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 +: | meta.embedded.block.graphql meta.variables.graphql punctuation.colon.graphql + | meta.embedded.block.graphql meta.variables.graphql +ID | meta.embedded.block.graphql meta.variables.graphql support.type.builtin.graphql +! | meta.embedded.block.graphql meta.variables.graphql keyword.operator.nulltype.graphql +) | meta.embedded.block.graphql meta.brace.round.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 +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 +' | punctuation.definition.string.template.end.js +) | +; | | const queryWithInlineComment = | \` | taggedTemplates punctuation.definition.string.template.begin.js @@ -276,7 +336,6 @@ something | taggedTemplates meta.embedded.block.gra } | taggedTemplates meta.embedded.block.graphql meta.selectionset.graphql punctuation.operation.graphql \` | taggedTemplates punctuation.definition.string.template.end.js ; | -// TODO: fix this | const queryWithInlineComment = \` | #graphql | query { | @@ -364,180 +423,260 @@ hello | meta.embedded.block.graphql meta.selectionset.graphql v `; exports[`inline.graphql grammar > should tokenize a simple typescript file 1`] = ` -/* eslint-disable */ | -// @ts-nocheck | - | -gql | entity.name.function.tagged-template.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 -{ | meta.embedded.block.graphql meta.selectionset.graphql punctuation.operation.graphql - | meta.embedded.block.graphql meta.selectionset.graphql -user | meta.embedded.block.graphql meta.selectionset.graphql variable.graphql -( | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql meta.brace.round.directive.graphql -id | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql variable.parameter.graphql -: | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql punctuation.colon.graphql - | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql -" | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql string.quoted.double.graphql punctuation.definition.string.begin.graphql -5 | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql string.quoted.double.graphql -" | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql string.quoted.double.graphql punctuation.definition.string.end.graphql -, | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql punctuation.comma.graphql - | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql -name | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql variable.parameter.graphql -: | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql punctuation.colon.graphql - boolean | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql constant.character.enum.graphql -) | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql meta.brace.round.directive.graphql - | meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql -{ | meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql punctuation.operation.graphql - | meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql -something | meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql variable.graphql - | meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql -} | 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 -\` | punctuation.definition.string.template.end.js -; | - | -graphql | entity.name.function.tagged-template.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 -{ | meta.embedded.block.graphql meta.selectionset.graphql punctuation.operation.graphql - | meta.embedded.block.graphql meta.selectionset.graphql -user | meta.embedded.block.graphql meta.selectionset.graphql variable.graphql -( | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql meta.brace.round.directive.graphql -id | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql variable.parameter.graphql -: | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql punctuation.colon.graphql - | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql -" | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql string.quoted.double.graphql punctuation.definition.string.begin.graphql -5 | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql string.quoted.double.graphql -" | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql string.quoted.double.graphql punctuation.definition.string.end.graphql -, | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql punctuation.comma.graphql - | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql -name | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql variable.parameter.graphql -: | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql punctuation.colon.graphql - boolean | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql constant.character.enum.graphql -) | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql meta.brace.round.directive.graphql - | meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql -{ | meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql punctuation.operation.graphql - | meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql -something | meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql variable.graphql - | meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql -} | 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 -\` | punctuation.definition.string.template.end.js -; | - | -const query = | - | -graphql | entity.name.function.tagged-template.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 -{ | meta.embedded.block.graphql meta.selectionset.graphql punctuation.operation.graphql - | meta.embedded.block.graphql meta.selectionset.graphql -user | meta.embedded.block.graphql meta.selectionset.graphql variable.graphql -( | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql meta.brace.round.directive.graphql -id | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql variable.parameter.graphql -: | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql punctuation.colon.graphql - | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql -" | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql string.quoted.double.graphql punctuation.definition.string.begin.graphql -5 | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql string.quoted.double.graphql -" | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql string.quoted.double.graphql punctuation.definition.string.end.graphql -, | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql punctuation.comma.graphql - | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql -name | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql variable.parameter.graphql -: | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql punctuation.colon.graphql - boolean | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql constant.character.enum.graphql -) | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql meta.brace.round.directive.graphql - | meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql -{ | meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql punctuation.operation.graphql - | meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql -something | meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql variable.graphql - | meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql -} | 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 -\` | punctuation.definition.string.template.end.js -; | - | -// TODO: Fix this | -const query = graphql('query { id }'); | - | -const queryWithInlineComment = | -\` | taggedTemplates punctuation.definition.string.template.begin.js -#graphql | taggedTemplates comment.line.graphql.js - | taggedTemplates meta.embedded.block.graphql -query | taggedTemplates meta.embedded.block.graphql keyword.operation.graphql - | taggedTemplates meta.embedded.block.graphql meta.selectionset.graphql -{ | taggedTemplates meta.embedded.block.graphql meta.selectionset.graphql punctuation.operation.graphql - | taggedTemplates meta.embedded.block.graphql meta.selectionset.graphql -user | taggedTemplates meta.embedded.block.graphql meta.selectionset.graphql variable.graphql -( | taggedTemplates meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql meta.brace.round.directive.graphql -id | taggedTemplates meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql variable.parameter.graphql -: | taggedTemplates meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql punctuation.colon.graphql - | taggedTemplates meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql -" | taggedTemplates meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql string.quoted.double.graphql punctuation.definition.string.begin.graphql -5 | taggedTemplates meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql string.quoted.double.graphql -" | taggedTemplates meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql string.quoted.double.graphql punctuation.definition.string.end.graphql -, | taggedTemplates meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql punctuation.comma.graphql - | taggedTemplates meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql -name | taggedTemplates meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql variable.parameter.graphql -: | taggedTemplates meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql punctuation.colon.graphql - boolean | taggedTemplates meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql constant.character.enum.graphql -) | taggedTemplates meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql meta.brace.round.directive.graphql - | taggedTemplates meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql -{ | taggedTemplates meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql punctuation.operation.graphql - | taggedTemplates meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql -something | taggedTemplates meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql variable.graphql - | taggedTemplates meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql -} | taggedTemplates meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql punctuation.operation.graphql - | taggedTemplates meta.embedded.block.graphql meta.selectionset.graphql -} | taggedTemplates meta.embedded.block.graphql meta.selectionset.graphql punctuation.operation.graphql -\` | taggedTemplates punctuation.definition.string.template.end.js -; | - | -const queryWithLeadingComment = | - | -/* GraphQL */ | comment.graphql.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 -{ | meta.embedded.block.graphql meta.selectionset.graphql punctuation.operation.graphql - | meta.embedded.block.graphql meta.selectionset.graphql -user | meta.embedded.block.graphql meta.selectionset.graphql variable.graphql -( | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql meta.brace.round.directive.graphql -id | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql variable.parameter.graphql -: | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql punctuation.colon.graphql - | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql -" | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql string.quoted.double.graphql punctuation.definition.string.begin.graphql -5 | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql string.quoted.double.graphql -" | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql string.quoted.double.graphql punctuation.definition.string.end.graphql -, | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql punctuation.comma.graphql - | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql -name | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql variable.parameter.graphql -: | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql punctuation.colon.graphql - boolean | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql constant.character.enum.graphql -) | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql meta.brace.round.directive.graphql - | meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql -{ | meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql punctuation.operation.graphql - | meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql -something | meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql variable.graphql - | meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql -} | 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 -\` | punctuation.definition.string.template.end.js -; | - | +/* eslint-disable */ | +// @ts-nocheck | + | +gql | entity.name.function.tagged-template.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 +{ | meta.embedded.block.graphql meta.selectionset.graphql punctuation.operation.graphql + | meta.embedded.block.graphql meta.selectionset.graphql +user | meta.embedded.block.graphql meta.selectionset.graphql variable.graphql +( | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql meta.brace.round.directive.graphql +id | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql variable.parameter.graphql +: | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql punctuation.colon.graphql + | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql +" | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql string.quoted.double.graphql punctuation.definition.string.begin.graphql +5 | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql string.quoted.double.graphql +" | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql string.quoted.double.graphql punctuation.definition.string.end.graphql +, | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql punctuation.comma.graphql + | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql +name | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql variable.parameter.graphql +: | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql punctuation.colon.graphql + boolean | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql constant.character.enum.graphql +) | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql meta.brace.round.directive.graphql + | meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql +{ | meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql punctuation.operation.graphql + | meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql +something | meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql variable.graphql + | meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql +} | 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 +\` | punctuation.definition.string.template.end.js +; | + | +graphql | entity.name.function.tagged-template.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 +{ | meta.embedded.block.graphql meta.selectionset.graphql punctuation.operation.graphql + | meta.embedded.block.graphql meta.selectionset.graphql +user | meta.embedded.block.graphql meta.selectionset.graphql variable.graphql +( | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql meta.brace.round.directive.graphql +id | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql variable.parameter.graphql +: | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql punctuation.colon.graphql + | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql +" | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql string.quoted.double.graphql punctuation.definition.string.begin.graphql +5 | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql string.quoted.double.graphql +" | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql string.quoted.double.graphql punctuation.definition.string.end.graphql +, | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql punctuation.comma.graphql + | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql +name | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql variable.parameter.graphql +: | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql punctuation.colon.graphql + boolean | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql constant.character.enum.graphql +) | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql meta.brace.round.directive.graphql + | meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql +{ | meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql punctuation.operation.graphql + | meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql +something | meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql variable.graphql + | meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql +} | 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 +\` | punctuation.definition.string.template.end.js +; | + | +const query = | + | +graphql | entity.name.function.tagged-template.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 +{ | meta.embedded.block.graphql meta.selectionset.graphql punctuation.operation.graphql + | meta.embedded.block.graphql meta.selectionset.graphql +user | meta.embedded.block.graphql meta.selectionset.graphql variable.graphql +( | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql meta.brace.round.directive.graphql +id | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql variable.parameter.graphql +: | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql punctuation.colon.graphql + | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql +" | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql string.quoted.double.graphql punctuation.definition.string.begin.graphql +5 | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql string.quoted.double.graphql +" | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql string.quoted.double.graphql punctuation.definition.string.end.graphql +, | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql punctuation.comma.graphql + | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql +name | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql variable.parameter.graphql +: | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql punctuation.colon.graphql + boolean | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql constant.character.enum.graphql +) | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql meta.brace.round.directive.graphql + | meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql +{ | meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql punctuation.operation.graphql + | meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql +something | meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql variable.graphql + | meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql +} | 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 +\` | punctuation.definition.string.template.end.js +; | + | +const query = | +graphql | entity.name.function.tagged-template.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 +' | punctuation.definition.string.template.end.js +) | +; | + | +const query = | +graphql | entity.name.function.tagged-template.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 +' | punctuation.definition.string.template.end.js +) | +; | + | +const query = | +graphql | entity.name.function.tagged-template.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 +' | punctuation.definition.string.template.end.js +) | +; | + | +const query = | +graphql | entity.name.function.tagged-template.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 +{ | 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 +\` | punctuation.definition.string.template.end.js +) | +; | + | +const query = | +graphql | entity.name.function.tagged-template.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 +{ | 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 +, | + [var1, var2] | +) | +; | + | +const queryWithInlineComment = | +\` | taggedTemplates punctuation.definition.string.template.begin.js +#graphql | taggedTemplates comment.line.graphql.js + | taggedTemplates meta.embedded.block.graphql +query | taggedTemplates meta.embedded.block.graphql keyword.operation.graphql + | taggedTemplates meta.embedded.block.graphql meta.selectionset.graphql +{ | taggedTemplates meta.embedded.block.graphql meta.selectionset.graphql punctuation.operation.graphql + | taggedTemplates meta.embedded.block.graphql meta.selectionset.graphql +user | taggedTemplates meta.embedded.block.graphql meta.selectionset.graphql variable.graphql +( | taggedTemplates meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql meta.brace.round.directive.graphql +id | taggedTemplates meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql variable.parameter.graphql +: | taggedTemplates meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql punctuation.colon.graphql + | taggedTemplates meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql +" | taggedTemplates meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql string.quoted.double.graphql punctuation.definition.string.begin.graphql +5 | taggedTemplates meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql string.quoted.double.graphql +" | taggedTemplates meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql string.quoted.double.graphql punctuation.definition.string.end.graphql +, | taggedTemplates meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql punctuation.comma.graphql + | taggedTemplates meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql +name | taggedTemplates meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql variable.parameter.graphql +: | taggedTemplates meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql punctuation.colon.graphql + boolean | taggedTemplates meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql constant.character.enum.graphql +) | taggedTemplates meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql meta.brace.round.directive.graphql + | taggedTemplates meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql +{ | taggedTemplates meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql punctuation.operation.graphql + | taggedTemplates meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql +something | taggedTemplates meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql variable.graphql + | taggedTemplates meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql +} | taggedTemplates meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql punctuation.operation.graphql + | taggedTemplates meta.embedded.block.graphql meta.selectionset.graphql +} | taggedTemplates meta.embedded.block.graphql meta.selectionset.graphql punctuation.operation.graphql +\` | taggedTemplates punctuation.definition.string.template.end.js +; | + | +const queryWithLeadingComment = | + | +/* GraphQL */ | comment.graphql.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 +{ | meta.embedded.block.graphql meta.selectionset.graphql punctuation.operation.graphql + | meta.embedded.block.graphql meta.selectionset.graphql +user | meta.embedded.block.graphql meta.selectionset.graphql variable.graphql +( | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql meta.brace.round.directive.graphql +id | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql variable.parameter.graphql +: | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql punctuation.colon.graphql + | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql +" | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql string.quoted.double.graphql punctuation.definition.string.begin.graphql +5 | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql string.quoted.double.graphql +" | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql string.quoted.double.graphql punctuation.definition.string.end.graphql +, | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql punctuation.comma.graphql + | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql +name | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql variable.parameter.graphql +: | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql punctuation.colon.graphql + boolean | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql constant.character.enum.graphql +) | meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql meta.brace.round.directive.graphql + | meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql +{ | meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql punctuation.operation.graphql + | meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql +something | meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql variable.graphql + | meta.embedded.block.graphql meta.selectionset.graphql meta.selectionset.graphql +} | 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 +\` | punctuation.definition.string.template.end.js +; | + | `; exports[`inline.graphql grammar > should tokenize a simple vue sfc comp file 1`] = `