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
funcTestMustHaveOneField(t*testing.T) {
_, err:=graphql.ParseSchema("type Query {} input Bar {} interface Qux {} enum Quux {}", nil)
iferr==nil {
t.Fatal("types, inputs, interfaces and enums must have at least one field")
}
}
Expected
Types, inputs, interfaces, and enums should be validated to ensure that there is at least one field.
The text was updated successfully, but these errors were encountered:
ssko1
changed the title
ObjectType, Input, and Interface Definitions should not be allowed with zero fields.
ObjectType, Input, Enum, and Interface Definitions should not be allowed with zero fields.
Mar 25, 2021
Current
fails the following test
Expected
Types, inputs, interfaces, and enums should be validated to ensure that there is at least one field.
Relevant specification links
ObjectTypeDefinition validation: https://spec.graphql.org/draft/#sel-HAHZhCFBABABuBq9O
InterfaceTypeDefinition validation: https://spec.graphql.org/draft/#sel-HAHbnBFBABABxB4a
EnumTypeDefinition validation: https://spec.graphql.org/draft/#sel-HAHfVFBABAB4B_6J
InputObjectTypeDefinition validation: https://spec.graphql.org/draft/#sel-HAHhBXDBABAB6BpkU
Environment
master
branchI'd be more than happy to contribute a fix.
The text was updated successfully, but these errors were encountered: