use-shopify
Version:
React hooks to work with Shopify's Storefront API
28 lines (27 loc) • 902 B
TypeScript
import { Paginated } from '@good-idea/unwind-edges';
import { Product, Collection } from '../types';
export declare type SearchQuery = (input: SearchQueryInput) => Promise<{
data: SearchQueryResult;
}>;
export interface SearchQueryResult {
products: Paginated<Product> | null;
collections: Paginated<Collection> | null;
}
export interface SearchQueryInput {
productQuery: string;
productFirst: number;
productAfter?: string;
productLast?: number;
productBefore?: string;
productReverse?: boolean;
collectionQuery: string;
collectionFirst: number;
collectionAfter?: string;
collectionLast?: number;
collectionBefore?: string;
collectionReverse?: boolean;
}
export declare const SEARCH_QUERY: import("graphql").DocumentNode;
export declare const defaultQueries: {
SEARCH_QUERY: import("graphql").DocumentNode;
};