Add product search (#64)

This commit is contained in:
Niklas Fondberg
2021-10-11 11:20:48 +02:00
committed by GitHub
parent 8b03ab8246
commit 08149c4a87
10 changed files with 168 additions and 4 deletions
+20 -1
View File
@@ -21,9 +21,10 @@ type Query {
order(id: ID!): Order
products(
pagination: PaginationInput!
filter: ProductsFilterInput!
filter: ProductsFilterInput
): ProductsResult
product(id: Int!): Product
productsSearch(q: String!): ProductsSearchResult
categories: [Category]
category(id: Int!): Category
keywords: [Keyword]
@@ -82,6 +83,18 @@ type ProductsResult {
items: [Product]
}
type ProductsSearchResult {
q: String!
"""
products contains matches for `name` and `artNo`
"""
products: [Product]
batches: [Batch]
keywords: [Keyword]
categories: [Category]
designers: [Designer]
}
input InteriorsFilterInput {
productId: Int!
}
@@ -245,6 +258,11 @@ type Category {
products: [Product]
}
type Batch {
name: String!
products: [Product]
}
type Product {
id: ID!
stockid: Int
@@ -378,6 +396,7 @@ type Designer {
name: String
path: String
orderRows(pagination: PaginationInput!, filter: DateFilterInput): [OrderRow]
products: [Product]
}
enum KeywordType {