System Information
- Strapi Version:
- Operating System:
- Database:
- Node Version:
- NPM Version:
- Yarn Version:
I’m pretty new to GraphQL but I thought something like that should work
query Shops {
shops(id: "1"){
data {
attributes {
name
description
variants {
data {
id
attributes {
name
category {
data {
attributes {
name
}
}
}
}
}
}
}
}
}
}
I tried placing the (id: “1”) (“id”: “1”) (id: 1) on roughly any item in the query and I can’t manage to make the query work.
Also, is there a way to flatten the response and not have all this data->id, attributes-> structure ? I guess I could do it client side but I wished it just arrived/was queried in a more readable manner