Added designers

This commit is contained in:
Niklas Fondberg
2021-04-08 23:11:24 +02:00
parent 2b57afbc4a
commit 3c648cee29
18 changed files with 366 additions and 151 deletions
+23 -17
View File
@@ -2,12 +2,25 @@ import { gql } from 'apollo-server';
const typeDefs = gql`
scalar DateTime
scalar Date
type Query {
orders: [Order]
orders(filter: FilterInput): [Order]
order(id: ID!): Order
products(limit: Int, visible: Boolean, browsable: Boolean): [Product]
product(id: Int!): Product
designers(limit: Int): [Designer]
designer(id: Int!): Designer
}
input DateInput {
from: Date
to: Date
}
input FilterInput {
dates: DateInput
limit: Int
}
type Market {
@@ -125,6 +138,8 @@ const typeDefs = gql`
printProducts: [PrintProduct]
blacklisting: [ProductBlacklist]
categories: [Category]
designerId: Int
designer: Designer
}
enum ProductGroup {
@@ -154,22 +169,13 @@ const typeDefs = gql`
inserted: DateTime!
updated: DateTime
}
type Designer {
id: ID!
name: String
path: String
orderRows(filter: FilterInput): [OrderRow]
}
`;
export { typeDefs };
/**
type Designer {
id: ID!
name: String
orderRows(fromDate: Date, toDate: Date): [OrderRow]
}
type Product {
designer: Designer
}
type Query {
designer(id: Int!): Designer
designers: [Designer]
}
*/