You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to a thread on Stack Overflow an empty list notation { } is indeed invalid, but the list itself is optional.
Expected behavior
I'm not sure what is correct here, but I'm assuming the GraphQL lib should not render empty lists { }. Both for InputObject and Objects. If not, maybe there should be runtime warnings for having InputObject/Objects without any field defined.
Actual behavior
See above
Additional context
No other context
The text was updated successfully, but these errors were encountered:
Describe the bug
Possible invalid schema generation
Versions
graphql
version: 2.0.5rails
(or other framework): Rails-7.0.3other applicable versions: graphql-batch (0.5.1)
GraphQL schema
See above
GraphQL query
See below
Steps to reproduce
Given I define an Input Object without any fields
When I generate the schema, I get the following result:
When I try to read this with
@graphql-tools/load
I get an error.However If I modify the output to
reading with
@graphql-tools/load
works fine.{ }
is indeed invalid, but the list itself is optional.Expected behavior
I'm not sure what is correct here, but I'm assuming the GraphQL lib should not render empty lists
{ }
. Both for InputObject and Objects. If not, maybe there should be runtime warnings for having InputObject/Objects without any field defined.Actual behavior
See above
Additional context
No other context
The text was updated successfully, but these errors were encountered: