graphql fetch using multiple IDs
fetch all related products from a list of products, and get results merged into one response!
const GET_RELATED_PRODUCTS = `
query getRelatedProducts($url: [String!]) {
products(filter: { url: { in: $url } }) {
items {
}
}
}
`
fetching just one product's related products
const GET_RELATED_PRODUCTS = `
query getRelatedProducts($url: String!) {
products(filter: { url: { eq: $url } }) {
items {
}
}
}
`