saleor-dashboard/src/containers/SearchProducts/index.tsx

28 lines
553 B
TypeScript
Raw Normal View History

2019-06-19 14:40:52 +00:00
import gql from "graphql-tag";
import BaseSearch from "../BaseSearch";
import {
SearchProducts,
SearchProductsVariables
} from "./types/SearchProducts";
export const searchProducts = gql`
query SearchProducts($after: String, $first: Int!, $query: String!) {
products(after: $after, first: $first, query: $query) {
edges {
node {
id
name
thumbnail {
url
}
}
}
}
}
`;
export default BaseSearch<SearchProducts, SearchProductsVariables>(
searchProducts
);