123456789_123456789_123456789_123456789_123456789_

Module: GraphQL::Client::ErubisEnhancer

Relationships & Source Files
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

Instance Method Details

#convert_input(src, input)

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

[ GitHub ]

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

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