Method: GraphQL::Schema#to_definition

Defined in:
lib/graphql/schema.rb

#to_definition(only: nil, except: nil, context: {}) ⇒ String

Return the GraphQL IDL for the schema

Parameters:

  • context (Hash) (defaults to: {})
  • only (<#call(member, ctx)>) (defaults to: nil)
  • except (<#call(member, ctx)>) (defaults to: nil)

Returns:

  • (String)
[View source]

541
542
543
# File 'lib/graphql/schema.rb', line 541

def to_definition(only: nil, except: nil, context: {})
  GraphQL::Schema::Printer.print_schema(self, only: only, except: except, context: context)
end