Major refactor

This commit is contained in:
Niklas Fondberg
2021-07-06 15:57:22 +02:00
parent 6bca11c62d
commit f66dbe33d7
21 changed files with 299 additions and 73 deletions
+22 -1
View File
@@ -6,10 +6,12 @@ const typeDefs = gql`
scalar JSON
type Query {
orders(filter: FilterInput): [Order]
orders(filter: FilterInput!): OrderResult
order(id: ID!): Order
products(limit: Int, visible: Boolean, browsable: Boolean): [Product]
product(id: Int!): Product
categories: [Category]
category(id: Int!): Category
designers(limit: Int): [Designer]
designer(id: Int!): Designer
}
@@ -21,7 +23,17 @@ const typeDefs = gql`
input FilterInput {
dates: DateInput
limit: Int!
offset: Int!
}
"""
Later replace with implements ListResult
"""
type OrderResult {
total: Int!
offset: Int
limit: Int
items: [Order]
}
type Market {
@@ -157,6 +169,13 @@ const typeDefs = gql`
type Category {
id: ID!
name: String
path: String
isLeaf: Int
depth: Int
childCount: Int
lft: Int
rgt: Int
products: [Product]
}
type Product {
@@ -171,6 +190,8 @@ const typeDefs = gql`
categories: [Category]
designerId: Int
designer: Designer
api1json: JSON
fields_json: JSON
}
enum ProductGroup {