Sha256: 9c7e5dc3ae766eb13fb6570722f2a3148e67530a0ae2e52ff4ea09679bfe83a7
Contents?: true
Size: 572 Bytes
Versions: 12
Compression:
Stored size: 572 Bytes
Contents
require "spec_helper" describe GraphQL::Argument do it "is validated at schema build-time" do query_type = GraphQL::ObjectType.define do name "Query" field :invalid, types.Boolean do argument :invalid, types.Float, default_value: ["123"] end end err = assert_raises { schema = GraphQL::Schema.new(query: query_type) schema.types } expected_error = %|Query is invalid: field "invalid" argument "invalid" default value ["123"] is not valid for type Float| assert_equal expected_error, err.message end end
Version data entries
12 entries across 12 versions & 1 rubygems