lib/graphql/schema/printer.rb in graphql-0.18.4 vs lib/graphql/schema/printer.rb in graphql-0.18.5

- old
+ new

@@ -1,12 +1,12 @@ module GraphQL class Schema # Used to convert your {GraphQL::Schema} to a GraphQL schema string # # @example print your schema to standard output - # Schema = GraphQL::Schema.new(query: QueryType) - # puts GraphQL::Schema::Printer.print_schema(Schema) + # MySchema = GraphQL::Schema.define(query: QueryType) + # puts GraphQL::Schema::Printer.print_schema(MySchema) # module Printer extend self # Return a GraphQL schema string for the defined types in the schema @@ -18,10 +18,10 @@ # Return the GraphQL schema string for the introspection type system def print_introspection_schema query_root = ObjectType.define do name "Query" end - schema = Schema.new(query: query_root) + schema = GraphQL::Schema.define(query: query_root) print_filtered_schema(schema, method(:is_introspection_type)) end private