summaryrefslogtreecommitdiff
path: root/runtime/queries/javascript/injections.scm
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/queries/javascript/injections.scm')
-rw-r--r--runtime/queries/javascript/injections.scm8
1 files changed, 8 insertions, 0 deletions
diff --git a/runtime/queries/javascript/injections.scm b/runtime/queries/javascript/injections.scm
index 5539241a..e8429111 100644
--- a/runtime/queries/javascript/injections.scm
+++ b/runtime/queries/javascript/injections.scm
@@ -9,6 +9,14 @@
]
arguments: (template_string) @injection.content)
+; Parse the contents of gql template literals
+
+((call_expression
+ function: (identifier) @_template_function_name
+ arguments: (template_string) @injection.content)
+ (#eq? @_template_function_name "gql")
+ (#set! injection.language "graphql"))
+
; Parse regex syntax within regex literals
((regex_pattern) @injection.content