Method: GraphQL::BaseType#to_definition

Defined in:
lib/graphql/base_type.rb

#to_definition(schema, printer: nil, **args) ⇒ String

Return a GraphQL string for the type definition

Parameters:

Returns:

  • (String)

    type definition

See Also:

  • for additional options}


204
205
206
207
# File 'lib/graphql/base_type.rb', line 204

def to_definition(schema, printer: nil, **args)
  printer ||= GraphQL::Schema::Printer.new(schema, **args)
  printer.print_type(self)
end