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
// InvalidNameErr is returned when an invalid name is used. In GraphQL, operation, alias, field and argument all have names.
// A valid name matches ^[_A-Za-z][_0-9A-Za-z]*$ exactly.
typeInvalidNameErrstruct {
TypenameType
Namestring
}
func (eInvalidNameErr) Error() string {
returnfmt.Sprintf("'%s' is an invalid %s in GraphQL. A valid name matches /[_A-Za-z][_0-9A-Za-z]*/, see: http://facebook.github.io/graphql/October2016/#sec-Names", e.Name, e.Type)
}
// InvalidOperationTypeErr is returned when the operation is not one of query, mutation and subscription.
typeInvalidOperationTypeErrstruct {
TypeoperationType
}
func (eInvalidOperationTypeErr) Error() string {
returnfmt.Sprintf("'%s' is an invalid operation type in GraphQL. A valid type is one of 'query', 'mutation', 'subscription'", e.Type)
}
// NilFieldErr is returned when any field is nil. Of course the author could choose to ignore nil fields. But, author chose a stricter construct.
typeNilFieldErrstruct{}
func (eNilFieldErr) Error() string {
return"nil Field is not allowed. Please initialize a correct Field with NewField(...) function or Field{...} literal"
}
// CyclicFieldErr is returned when any field contains a loop which goes back to itself.