As the error states, I have a non-model object type which has a field of a type that is a Graphback model. This was working fine in alpha versions, but now I get this error. I need this functionality, I have custom data types that have nothing to do with the access to the database, but that return types that have access to the database. I'm not sure what this restriction is for, graphback should just ignore these types like it used to, if possible.
Here's my non-model type:
type AnonymousJWTAuthResult {
user: Users!
csrfToken: String!
authJWT: String!
}
The user field is of type Users, which is a modle. I return the AnonymousJWTAuthResult in a custom mutation, not sure why this is restricted.
Looks like regression on last beta.
What is the error?
CC @craicoverflow
Thanks for highlighting this bug for us. Basically this was disabled to prevent a Maximum call stack exceeded error when a Model references a non-model which references that model again.
Obviously we made this too restrictive, so there is a fix in https://github.com/aerogear/graphback/pull/1753 which we hope to get in soon.
Awesome work @craicoverflow! This seems like something we can do in 0.14.1 release :)
Fix available in 0.14.1