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

151
Vistas
Gatsby group doesn't work in GraphQL with custom nested types

I have the following types defined in Gatsby:

type Track implements Node {
  title: String!
  chapters: [Chapter] @link
}

type Chapter implements Node {
  title: String!
  videos: [Video] @link
}

type Video implements Node {
  title: String!
}

This is all set up and working nicely when I query data like this:

query {
  allTrack {
    chapters {
      videos {
        title
      }
    }
  }
}

However, when I try to use the group keyword in GraphQL, it returns a really weird response:

query {
  allTrack {
    group(field: chapters___videos___title) {
      fieldValue
      totalCount
    }
  }
}

// RESPONSE
{
  "data": {
    "allTrack": {
      "group": [
        {
          "fieldValue": "Title 1,Title 2",
          "totalCount": 5
        }
      ]
    }
  }
}

In other words, it seems to be adding all the titles together instead of counting them separately. If I just count the track titles, everything works perfectly.

Can anyone help with this?

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