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

200
Vistas
And/Or Operators in WPGraphQL

Is it possible to use them? Specifically with where... Something like:

posts(where: {_and: [{categoryName: "foo"}, {categoryName: bar}]}) {
    edges {
      node {
        id
      }
    }
  }

If not, can anyone think of a workaround that achieves the same thing?

I'm thinking I could do this:

posts(where: {categoryName: "foo"}) {
    edges {
      node {
        id
        categories(where: {name: ["bar"]}) {
          edges {
            node {
              id
            }
          }
        }
      }
    }
  }

And then some operation on the returned data that filters out posts with falsy categories objects?

I can see a potential downside being we're fetching data we don't need.

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