Added designers
This commit is contained in:
+23
-17
@@ -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]
|
||||
}
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user