saleor-dashboard/cypress/support/api/requests/storeFront/Collections.js

24 lines
487 B
JavaScript
Raw Normal View History

export function getCollection({ collectionId, channelSlug, auth }) {
const query = `query Collection{
collection(id: "${collectionId}" channel: "${channelSlug}") {
id
slug
name
description
channelListings{
isPublished
}
products(first:100){
totalCount
edges{
node{
id
name
2021-02-24 13:21:19 +00:00
}
}
}
}
}`;
return cy.sendRequestWithQuery(query, auth).its("body.data");
2021-02-24 13:21:19 +00:00
}