Method: GraphQL::Language::SanitizedPrinter#print_operation_definition
- Defined in:
- lib/graphql/language/sanitized_printer.rb
#print_operation_definition(operation_definition, indent: "") ⇒ Object
Print the operation definition but do not include the variable definitions since we will inline them within the query
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 |
# File 'lib/graphql/language/sanitized_printer.rb', line 154 def print_operation_definition(operation_definition, indent: "") old_type = @current_type @current_type = query.schema.public_send(operation_definition.operation_type) if @inline_variables print_string("#{indent}#{operation_definition.operation_type}") print_string(" #{operation_definition.name}") if operation_definition.name print_directives(operation_definition.directives) print_selections(operation_definition.selections, indent: indent) else super end @current_type = old_type end |