Query won't go through. Loading forever

Problem

When making a “login” query using auto generated “checkUserPassword” query it starts loading forever.

Login query

    query Login($username: String!, $password: String!){
        checkUserPassword(username: $username, password: $password){
            username
            parties
            characters{
                name
            }
        }
      }

But when i remove “parties” from that query response it will work.

User schema

type User @secret(field: "password") {
    username: String! @id
    email: String!
    characters: [Character] @hasInverse(field: owner)
    parties: [String]!
    role: UserRole! @search
}

It seems that the user has this parties field and its just empty array as it should. Also if
the user has1 or none characters in the characters array the query will work. This is some black magic stuff and i really need some professional help. I also need help with this problem :wink:

1 Like

Try this:

type User @secret(field: "password") {
    username: String! @id
    email: String!
    characters: [Character] @hasInverse(field: owner)
    parties: [String!]
    role: UserRole! @search
}

?

I can try that but I want the option to keep the array empty? Wont that require me to actually pass a string in the array?

With this you can pass null into the array

No change… With new containers, when i add user i can login just fine. But if i add two characters to it i cant login no more…

If i make the query with no parties in response it goes trough and if i make the query with no characters it goes trough. But if they both are in the query response it wont work.

EDIT

If i put parties below characters in the query response list everything works just fine… Is there a explanation for this behavior?