Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

631
Views
"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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!