import combineQuery from 'graphql-combine-query' import {GET_PRODUCTS} from "~/graphql/queries/standalone/products"; import {GET_CATEGORY_BY_SLUG} from "~/graphql/queries/standalone/categories"; export const getStore = ( productsVariables?: { first?: number; productAfter?: string; categoriesSlug?: string; orderby?: string; minPrice?: number; maxPrice?: number; attributes?: string; }, categoryVariables?: { categorySlug?: string; } ) => { const { document, variables } = combineQuery('getStoreData') .add(GET_PRODUCTS, productsVariables || {}) .add(GET_CATEGORY_BY_SLUG, categoryVariables || {}) return { document, variables }; };