Skip to content

Commit

Permalink
fix(graphql): include following json body
Browse files Browse the repository at this point in the history
  • Loading branch information
boltlessengineer committed Jul 25, 2024
1 parent b4f07cf commit 8540ab3
Show file tree
Hide file tree
Showing 5 changed files with 3,903 additions and 3,726 deletions.
5 changes: 3 additions & 2 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ module.exports = grammar({
$.external_body,
$.xml_body,
$.json_body,
$.graphql_body,
$.graphql_data,
),
),
),
Expand Down Expand Up @@ -147,10 +147,11 @@ module.exports = grammar({

json_body: ($) =>
seq(
choice("{", "["),
token(prec(1, choice("{", "["))),
repeat1(LINE_TAIL),
),

graphql_data: ($) => seq($.graphql_body, optional($.json_body)),
graphql_body: ($) =>
seq(
choice("query", "mutation"),
Expand Down
50 changes: 39 additions & 11 deletions src/grammar.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 20 additions & 9 deletions src/node-types.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8540ab3

Please sign in to comment.