Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

615
Vistas
"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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda