Sha256: f6a37f68a012e6125f4305ffe9f1a3192a61e43a34666682a8d3ae824929efec
Contents?: true
Size: 1.1 KB
Versions: 1
Compression:
Stored size: 1.1 KB
Contents
require "spec_helper" describe GraphQL::Introspection::SchemaType do let(:query_string) {%| query getSchema { __schema { types { name } queryType { fields { name }} mutationType { fields { name }} } } |} let(:result) { DummySchema.execute(query_string) } it "exposes the schema" do expected = { "data" => { "__schema" => { "types" => DummySchema.types.values.map { |t| t.name.nil? ? (p t; raise("no name for #{t}")) : {"name" => t.name} }, "queryType"=>{ "fields"=>[ {"name"=>"cheese"}, {"name"=>"cow"}, {"name"=>"dairy"}, {"name"=>"error"}, {"name"=>"executionError"}, {"name"=>"favoriteEdible"}, {"name"=>"fromSource"}, {"name"=>"maybeNull"}, {"name"=>"milk"}, {"name"=>"searchDairy"}, ] }, "mutationType"=> { "fields"=>[ {"name"=>"pushValue"}, {"name"=>"replaceValues"}, ] }, } }} assert_equal(expected, result) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
graphql-0.13.0 | spec/graphql/introspection/schema_type_spec.rb |