Sha256: e99fe3a7fe3aaaf3b3e32ada511ec9c4687622a4cb9118d95b5eb15b719048b9
Contents?: true
Size: 1.3 KB
Versions: 27
Compression:
Stored size: 1.3 KB
Contents
require "spec_helper" describe GraphQL::Introspection::DirectiveType do let(:query_string) {%| query getDirectives { __schema { directives { name, args { name, type { name, ofType { name } } }, locations # Deprecated fields: onField onFragment onOperation } } } |} let(:result) { DummySchema.execute(query_string) } it "shows directive info " do expected = { "data" => { "__schema" => { "directives" => [ { "name" => "skip", "args" => [ {"name"=>"if", "type"=>{"name"=>"Non-Null", "ofType"=>{"name"=>"Boolean"}}} ], "locations"=>["FIELD", "FRAGMENT_SPREAD", "INLINE_FRAGMENT"], "onField" => true, "onFragment" => true, "onOperation" => false, }, { "name" => "include", "args" => [ {"name"=>"if", "type"=>{"name"=>"Non-Null", "ofType"=>{"name"=>"Boolean"}}} ], "locations"=>["FIELD", "FRAGMENT_SPREAD", "INLINE_FRAGMENT"], "onField" => true, "onFragment" => true, "onOperation" => false, }, ] } }} assert_equal(expected, result) end end
Version data entries
27 entries across 27 versions & 1 rubygems