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 the GraphQL specification both object types and input types should have at least one field. See here and here. So, the following program should crash saying something about empty types. Currently graphql-go just lets it through.
package main
import graphql "github.com/graph-gophers/graphql-go"funcmain() {
graphql.MustParseSchema("type Foo{}", nil)
}
The text was updated successfully, but these errors were encountered:
Ok, I'll take that back. It's not ok as per the specs (as @nonpop wrote). How ever I'd suggest to keep it as is, as empty types are very useful (see my the linked issue).
According to the GraphQL specification both object types and input types should have at least one field. See here and here. So, the following program should crash saying something about empty types. Currently graphql-go just lets it through.
The text was updated successfully, but these errors were encountered: