Resolving updateGQLSchema failed because Type User: @auth: failed to validate GraphQL rule [reason : Field "eq" is not defined by type ID.]

Changing the rule in question to the following fixed the issue. For some reason eq: doesn’t work with ID fields and the $USERID value from the JWT needs to be typed as ID!:

    { rule: """
        query($USERID: ID!) {
          queryUser(filter: {
            id: [$USERID]
          }) {
            id
          }
        }
      """
    }
1 Like