Skip to content

Commit

Permalink
Add broken test for connection instrumentation field types
Browse files Browse the repository at this point in the history
  • Loading branch information
rmosolgo committed Jun 29, 2017
1 parent 952bb07 commit 238b703
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions spec/graphql/schema/reduce_types_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,20 @@ def reduce_types(types)
assert_equal(Dummy::DairyProductInputType, result["DairyProductInput"])
end

it "finds scalar types" do
type = GraphQL::ObjectType.define do
name "ArgTypeTest"
field :s, types.String
end
result = reduce_types([type.connection_type])
pp result.keys
expected_types = [
"ArgTypeTest", "ArgTypeTestConnection", "ArgTypeTestEdge",
"Boolean", "Int", "PageInfo", "String"
]
assert_equal expected_types, result.keys.sort
end

it "finds types from nested InputObjectTypes" do
type_child = GraphQL::InputObjectType.define do
name "InputTypeChild"
Expand Down

0 comments on commit 238b703

Please sign in to comment.