Added categories to products

This commit is contained in:
Niklas Fondberg
2021-04-08 15:39:50 +02:00
parent f60a51a94b
commit d30432f4f4
4 changed files with 31 additions and 24 deletions
+1 -24
View File
@@ -124,6 +124,7 @@ const typeDefs = gql`
updated: DateTime
printProducts: [PrintProduct]
blacklisting: [ProductBlacklist]
categories: [Category]
}
enum ProductGroup {
@@ -157,42 +158,18 @@ const typeDefs = gql`
export { typeDefs };
/**
type Category {
id: ID!
name: String
}
type Designer {
id: ID!
name: String
orderRows(fromDate: Date, toDate: Date): [OrderRow]
}
type PrintProduct {
insertedDate: DateTime!
updatedDate: DateTime
}
type Product {
categories: [Category]
designer: Designer
insertedDate: DateTime!
updatedDate: DateTime
}
type ProductBlacklist {
market: Market
insertedDate: DateTime!
updatedDate: DateTime
}
type Query {
product(id: Int!): Product
designer(id: Int!): Designer
designers: [Designer]
}
*/