Module: GraphQL::Schema::Printer
Overview
Used to convert your GraphQL::Schema to a GraphQL schema string
Instance Method Summary collapse
-
#print_introspection_schema ⇒ Object
Return the GraphQL schema string for the introspection type system.
-
#print_schema(schema) ⇒ Object
Return a GraphQL schema string for the defined types in the schema.
Instance Method Details
#print_introspection_schema ⇒ Object
Return the GraphQL schema string for the introspection type system
19 20 21 22 23 24 25 |
# File 'lib/graphql/schema/printer.rb', line 19 def print_introspection_schema query_root = ObjectType.define do name "Query" end schema = GraphQL::Schema.define(query: query_root) print_filtered_schema(schema, method(:is_introspection_type)) end |
#print_schema(schema) ⇒ Object
Return a GraphQL schema string for the defined types in the schema
14 15 16 |
# File 'lib/graphql/schema/printer.rb', line 14 def print_schema(schema) print_filtered_schema(schema, method(:is_defined_type)) end |