Sha256: e5d59cdff8e2b53108e1b8d6c7e3ea431b2b0e6a9359dcff3334e80b1dd1e231

Contents?: true

Size: 1.05 KB

Versions: 17

Compression:

Stored size: 1.05 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) { 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"}}}
            ],
            "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

17 entries across 17 versions & 1 rubygems

Version Path
graphql-0.12.1 spec/graphql/introspection/directive_type_spec.rb
graphql-0.12.0 spec/graphql/introspection/directive_type_spec.rb
graphql-0.11.1 spec/graphql/introspection/directive_type_spec.rb
graphql-0.11.0 spec/graphql/introspection/directive_type_spec.rb
graphql-0.10.9 spec/graphql/introspection/directive_type_spec.rb
graphql-0.10.8 spec/graphql/introspection/directive_type_spec.rb
graphql-0.10.7 spec/graphql/introspection/directive_type_spec.rb
graphql-0.10.6 spec/graphql/introspection/directive_type_spec.rb
graphql-0.10.5 spec/graphql/introspection/directive_type_spec.rb
graphql-0.10.4 spec/graphql/introspection/directive_type_spec.rb
graphql-0.10.3 spec/graphql/introspection/directive_type_spec.rb
graphql-0.10.2 spec/graphql/introspection/directive_type_spec.rb
graphql-0.10.1 spec/graphql/introspection/directive_type_spec.rb
graphql-0.10.0 spec/graphql/introspection/directive_type_spec.rb
graphql-0.9.5 spec/graphql/introspection/directive_type_spec.rb
graphql-0.9.4 spec/graphql/introspection/directive_type_spec.rb
graphql-0.9.3 spec/graphql/introspection/directive_type_spec.rb