Sha256: 5fb98422093d25b543bd5922be0f759807fec04209bb04030f8c7584e2d23914
Contents?: true
Size: 1.09 KB
Versions: 1
Compression:
Stored size: 1.09 KB
Contents
require 'spec_helper' describe GraphQL::Introspection::DirectiveType do let(:query_string) {%| query getDirectives { __schema { directives { name, args { name, type { name, ofType { name } } }, onField, onFragment, onOperation } } } |} let(:result) { GraphQL::Query.new(DummySchema, query_string).result } it 'shows directive info ' do expected = { "data" => {"getDirectives" => { "__schema" => { "directives" => [ { "name" => "skip", "args" => [ {"name"=>"if", "type"=>{"name"=>"Non-Null", "ofType"=>{"name"=>"Boolean"}}} ], "onField" => true, "onFragment" => true, "onOperation" => false, }, { "name" => "include", "args" => [ {"name"=>"if", "type"=>{"name"=>"Non-Null", "ofType"=>{"name"=>"Boolean"}}} ], "onField" => true, "onFragment" => true, "onOperation" => false, }, ] } }}} assert_equal(expected, result) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
graphql-0.2.0 | spec/graph_ql/introspection/directive_type_spec.rb |