I have a blog in JavaScript and I'm using Apollo GraphQL to save my data. I intend to get six articles of three categories. So I make a request to take all posts of one category and repeat this request three times with the categories's id's.
So, I intend to transform my three requests in only one, but I can't.
My code:
{
allPosts(where: {category: "id"}, first: 6) {
edges {
node {
title
image
}
}
}
}