Module: GraphQL::Client::ErubisEnhancer

Defined in:
lib/graphql/client/erubis_enhancer.rb

Overview

Public: Erubis enhancer that adds support for GraphQL static query sections.

<%graphql
  query GetVersion {
    version
  }
%>
<%= data.version %>

Instance Method Summary collapse

Instance Method Details

#convert_input(src, input) ⇒ Object

Internal: Extend Erubis handler to simply ignore <%graphql sections.



16
17
18
19
# File 'lib/graphql/client/erubis_enhancer.rb', line 16

def convert_input(src, input)
  input = input.gsub(/<%graphql/, "<%#")
  super(src, input)
end