Sha256: e2c32473000555f85000a5a335f2aa4a8606880f2800167210f5bace729e4b1a
Contents?: true
Size: 1010 Bytes
Versions: 3
Compression:
Stored size: 1010 Bytes
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) { GraphQL::Query.new(DummySchema, query_string).result } 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"=>"milk"}, {"name"=>"fromSource"}, {"name"=>"favoriteEdible"}, {"name"=>"searchDairy"}, {"name"=>"error"}, ] }, "mutationType"=> { "fields"=>[ {"name"=>"pushValue"}, {"name"=>"replaceValues"}, ] }, } }} assert_equal(expected, result) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
graphql-0.6.2 | spec/graphql/introspection/schema_type_spec.rb |
graphql-0.6.1 | spec/graphql/introspection/schema_type_spec.rb |
graphql-0.6.0 | spec/graphql/introspection/schema_type_spec.rb |