1
0

Part browsing

This commit is contained in:
Ahmed Al-Taiar
2023-11-04 17:32:14 -04:00
parent af93899796
commit 53e0070fd8
28 changed files with 817 additions and 62 deletions

View File

@@ -8,7 +8,29 @@ export const schema = gql`
createdAt: DateTime!
}
type PartPage {
parts: [Part!]!
count: Int!
page: Int!
sort: SortMethod!
order: SortOrder!
}
enum SortMethod {
id
name
description
stock
createdAt
}
enum SortOrder {
ascending
descending
}
type Query {
partPage(page: Int, sort: SortMethod, order: SortOrder): PartPage @skipAuth
parts: [Part!]! @skipAuth
part(id: Int!): Part @skipAuth
}