Add keywords and product types

This commit is contained in:
Niklas Fondberg
2021-07-07 16:16:58 +02:00
parent 512ebf89f5
commit 267bc4f1c9
11 changed files with 262 additions and 53 deletions
+26
View File
@@ -12,6 +12,8 @@ const typeDefs = gql`
product(id: Int!): Product
categories: [Category]
category(id: Int!): Category
keywords: [Keyword]
keyword(id: Int!): Keyword
designers(limit: Int): [Designer]
designer(id: Int!): Designer
}
@@ -190,6 +192,12 @@ const typeDefs = gql`
categories: [Category]
designerId: Int
designer: Designer
keywords: [Keyword]
"""
Will be single value return in later release
"""
type: [ProductType]
# Below are for debug
api1json: JSON
fields_json: JSON
}
@@ -206,6 +214,12 @@ const typeDefs = gql`
UNKNOWN
}
enum ProductType {
UNKNOWN
PHOTO
ILLUSTRATION
}
type ProductBlacklist {
id: ID!
groupId: Int!
@@ -231,6 +245,18 @@ const typeDefs = gql`
path: String
orderRows(filter: FilterInput): [OrderRow]
}
enum KeywordType {
NOT_SET
COLOR
}
type Keyword {
id: Int!
value: String!
type: KeywordType
products: [Product]
}
`;
export { typeDefs };