Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

621
Visualizações
"variable invitationId of type Int! is used in position expecting Int_comparison_exp"

I was trying following query on hasura platform and it gave below error. I got solution for the same. That's why I'm sharing. variables:

     {
          "invaId": 791
       }


Query:


    mutation UpdateQuery($status:String!,$invaId:Int!) {
      update_inva(_set: {status: $status},where:{id:$invaId}){
         affected_rows
      }
    }


Output:
{
  "errors": [
    {
      "extensions": {
        "path": "$.selectionSet.update_inva.args.where.id",
        "code": "validation-failed"
      },
      "message": "variable invaId of type Int! is used in position expecting Int_comparison_exp"
    }
  ]
}

I faced this error after passing the variable of type Int!.

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

The problem is in query.

Look at the where clause

where:{id:$invitationId})

where clause expects the comparison type too for eg. _eq.

That was the exact thing which I was missing.

So, I updated the query as below, and things were running perfectly

Query:

mutation UpdateQuery($status:String!,$invaId:Int!) {
  update_inva(_set: {status: $status},where:{id:{_eq:$invaId}}){
    affected_rows
  }
}
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda