Sha256: 8f1ea135c4aec7e9f98784d0dab198508a2a4eb4aeaeb305c8354f300fb3df90
Contents?: true
Size: 1.07 KB
Versions: 11
Compression:
Stored size: 1.07 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" => { "__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
11 entries across 11 versions & 1 rubygems