Fixes: None; Extra: 1) Create Pinia stores for app, user, category, and company management; 2) Add utility functions for error handling and category slug lookups; 3) Include German locale file and robots.txt for improved SEO and accessibility; 4) Add SVG assets and improve general folder structure for better maintainability.
24 lines
No EOL
686 B
TypeScript
24 lines
No EOL
686 B
TypeScript
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 };
|
|
}; |