Sha256: dc8c4d9200eca7e04d44318e5a4caf00f00e49397c877efd0e090ff1b934a714
Contents?: true
Size: 662 Bytes
Versions: 52
Compression:
Stored size: 662 Bytes
Contents
# frozen_string_literal: true require "spec_helper" describe GraphQL::StaticValidation::NoDefinitionsArePresent do include StaticValidationHelpers describe "when schema definitions are present in the query" do let(:query_string) { <<-GRAPHQL { cheese(id: 1) { flavor } } type Thing { stuff: Int } scalar Date GRAPHQL } it "adds an error" do assert_equal 1, errors.length err = errors[0] assert_equal "Query cannot contain schema definitions", err["message"] assert_equal [{"line"=>5, "column"=>7}, {"line"=>9, "column"=>7}], err["locations"] end end end
Version data entries
52 entries across 52 versions & 1 rubygems