From 7ec509e2f9a054eb814789ac34f4222bebb67230 Mon Sep 17 00:00:00 2001 From: Joe Date: Thu, 28 Mar 2024 21:45:17 -0400 Subject: [PATCH] Add injections for GraphQL and ERB in Ruby (#10036) --- runtime/queries/ruby/injections.scm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/runtime/queries/ruby/injections.scm b/runtime/queries/ruby/injections.scm index 1a865df1969f..3e0d8bb83397 100644 --- a/runtime/queries/ruby/injections.scm +++ b/runtime/queries/ruby/injections.scm @@ -6,3 +6,18 @@ (heredoc_end) @name (#set! injection.language "sql")) (#eq? @name "SQL")) + +((heredoc_body + (heredoc_content) @injection.content + (heredoc_end) @name + (#set! injection.language "graphql")) + (#any-of? @name + "GQL" + "GRAPHQL")) + +((heredoc_body + (heredoc_content) @injection.content + (heredoc_end) @name + (#set! injection.language "erb")) + (#eq? @name "ERB")) +