Sha256: ec1740a5604d25399caabc6f2b14255de45ef77f6d1848d9765f1db96dcf09d1

Contents?: true

Size: 560 Bytes

Versions: 76

Compression:

Stored size: 560 Bytes

Contents

# frozen_string_literal: true
require "spec_helper"

describe GraphQL::StaticValidation::FragmentTypesExist do
  include StaticValidationHelpers

  let(:query_string) {"
    fragment on Cheese {
      id
      flavor
    }
  "}

  it "finds non-existent types on fragments" do
    assert_equal(1, errors.length)
    fragment_def_error = {
      "message"=>"Fragment definition has no name",
      "locations"=>[{"line"=>2, "column"=>5}],
      "fields"=>["fragment "],
    }
    assert_includes(errors, fragment_def_error, "on fragment definitions")
  end
end

Version data entries

76 entries across 76 versions & 1 rubygems

Version Path
graphql-1.8.0.pre11 spec/graphql/static_validation/rules/fragments_are_named_spec.rb
graphql-1.8.0.pre10 spec/graphql/static_validation/rules/fragments_are_named_spec.rb
graphql-1.7.14 spec/graphql/static_validation/rules/fragments_are_named_spec.rb
graphql-1.8.0.pre9 spec/graphql/static_validation/rules/fragments_are_named_spec.rb
graphql-1.8.0.pre8 spec/graphql/static_validation/rules/fragments_are_named_spec.rb
graphql-1.7.13 spec/graphql/static_validation/rules/fragments_are_named_spec.rb
graphql-1.8.0.pre7 spec/graphql/static_validation/rules/fragments_are_named_spec.rb
graphql-1.7.12 spec/graphql/static_validation/rules/fragments_are_named_spec.rb
graphql-1.7.11 spec/graphql/static_validation/rules/fragments_are_named_spec.rb
graphql-1.7.10 spec/graphql/static_validation/rules/fragments_are_named_spec.rb
graphql-1.8.0.pre6 spec/graphql/static_validation/rules/fragments_are_named_spec.rb
graphql-1.8.0.pre5 spec/graphql/static_validation/rules/fragments_are_named_spec.rb
graphql-1.7.9 spec/graphql/static_validation/rules/fragments_are_named_spec.rb
graphql-1.8.0.pre4 spec/graphql/static_validation/rules/fragments_are_named_spec.rb
graphql-1.8.0.pre3 spec/graphql/static_validation/rules/fragments_are_named_spec.rb
graphql-1.7.8 spec/graphql/static_validation/rules/fragments_are_named_spec.rb
graphql-1.8.0.pre2 spec/graphql/static_validation/rules/fragments_are_named_spec.rb
graphql-1.7.7 spec/graphql/static_validation/rules/fragments_are_named_spec.rb
graphql-1.8.0.pre1 spec/graphql/static_validation/rules/fragments_are_named_spec.rb
graphql-1.7.6 spec/graphql/static_validation/rules/fragments_are_named_spec.rb