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

247
Views
¡Nombre esperado, encontrado! Graphql al pasar dinámico donde a través de variables

Soy nuevo en Graphql, para una consulta necesito aplicar filtros. como seguí con este problema https://github.com/hasura/graphql-engine/issues/2355 , decidí pasar la cláusula where en sí misma dinámicamente como una variable. pero estoy recibiendo

 Expected Name, found

Aquí está mi código

 const where = { ...(condition1 ? {created_at: { created_at: { _in: this.startDate } } } : {}), ...(condition2 ? {payment: { source: { _in: this.selectedStore } } } : {}), } const { data } = await this.$apollo.query({ query: orders_by_storeid_and_creation_time, variables: { where }, fetchPolicy: "no-cache" });

esto es .gql

 interface orders_filter_type{ created_at:! any; payment:!any } query orders_by_storeid_and_creation_time( $where:orders_filter_type //tried $where:[orders_filter_type] //tried $where:any ) { orders( where:where ) { ...someFragment } }

Estoy tratando de implementar de una manera que, si el filtro no se aplica, ni siquiera debería permitir que la cláusula graphql where alcance esa condición.

about 4 years ago · Juan Pablo Isaza
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!