From 0b55b21f3069640d37d2fa34bd413986177c0cd7 Mon Sep 17 00:00:00 2001 From: Jared Ramirez Date: Fri, 21 Jan 2022 06:16:40 -0800 Subject: feat(languages): GraphQL (#1515) * Add Graphql language support * Fix docs gen * Add JS Graphql injection query * Updates based on PR feedback Co-authored-by: Blaž Hrastnik --- runtime/queries/javascript/injections.scm | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'runtime/queries/javascript') 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 -- cgit v1.2.3-70-g09d2