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
interfaceNamer {
name: String!
}
typeUserimplementsNamer {
id: ID!name(type: NameType = FULL): String!email: String!
}
enumNameType {
FULL FIRST LAST
}
typeQuery {
namedThings: [Namer]
}
and the query
{
namedThings {
name
}
}
I would expect the name field resolver to receive the default argument value for the argument type when the Namer being resolved is a User.
func (r*UserResolver) Name(args*struct{Typestring}) string {
switchargs.Type {
case"":
panic("argument 'type' should have a value!")
default:
// the value was set, continue
}
return""
}
Actual behavior
The value of the type argument is un-set. If the field resolver was written as above, the panic would be triggered.
Expected behavior
Given the schema
and the query
I would expect the
name
field resolver to receive the default argument value for the argumenttype
when theNamer
being resolved is aUser
.Actual behavior
The value of the
type
argument is un-set. If the field resolver was written as above, the panic would be triggered.Relevant links
The text was updated successfully, but these errors were encountered: