Added products

This commit is contained in:
Niklas Fondberg
2021-04-07 16:06:55 +02:00
parent 949c641410
commit 59e385c144
6 changed files with 163 additions and 56 deletions
+45 -7
View File
@@ -6,15 +6,15 @@ const typeDefs = gql`
type Query {
orders: [Order]
order(id: ID!): Order
products: [Product]
products(limit: Int, visible: Boolean, browsable: Boolean): [Product]
}
type Order {
id: ID!
inserted: DateTime
paid: Boolean
confirmed: Boolean
delivered: Boolean
inserted: DateTime!
paid: Boolean!
confirmed: Boolean!
delivered: Boolean!
newsletter: Boolean
creditInvoice: Boolean
canceled: Boolean
@@ -53,15 +53,53 @@ const typeDefs = gql`
customerCellphone: String
billingAddressId: Int
deliveryAddressId: Int
flyer_ids: String
flyerIds: String
market: String
locale: String
}
type Product {
id: ID!
artNo: String!
path: String!
visible: Boolean!
browsable: Boolean!
inserted: DateTime!
updated: DateTime
printProducts: [PrintProduct]
blacklisting: [ProductBlacklist]
}
enum ProductGroup {
PHOTO_WALLPAPER
CANVAS
WALLPAPER
DO_IT_YOURSELF_FRAME
DESIGNER_WALLPAPER
POSTER
FRAMED_PRINT
}
type ProductBlacklist {
id: ID!
groupId: Int!
group: ProductGroup!
marketId: Int!
inserted: DateTime!
updated: DateTime!
}
type PrintProduct {
id: ID!
groupId: Int!
group: ProductGroup!
inserted: DateTime!
updated: DateTime
}
`;
/**
*/
export { typeDefs };