Skip to content

Commit

Permalink
Updates for graphiqls files(size, item, item-info)
Browse files Browse the repository at this point in the history
  • Loading branch information
denomelchenko committed May 28, 2024
1 parent f4e3f81 commit a00df43
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
12 changes: 12 additions & 0 deletions src/main/resources/graphql/item-info.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,16 @@ type ItemInfo {
color: Color!
image: String
size: Size!
isColorAvailable: Boolean!
}

input ItemInfoInput {
color: Color!
image: String!
size: SizeInput!
isColorAvailable: Boolean!
}

extend type Mutation {
itemInfo(itemInfoInput: ItemInfoInput!): ItemInfo!
}
17 changes: 16 additions & 1 deletion src/main/resources/graphql/item.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,29 @@ type Item {
price: Float!,
availableCount: Int!,
salePrice: Float,
image: String,
soldCount: Int!
itemInfos: [ItemInfo!]!
}

input ItemInput {
title: String!,
shortDisc: String!,
longDisc: String,
rating: String,
price: Float!,
availableCount: Int!,
categoryId: String!,
salePrice: Float,
soldCount: Int!
}

extend type Query {
bestSellers(limit: Int): [Item!]!,
itemsByTitle(title: String!, language: Language!, paginationRequest: PaginationRequest!): [Item!]!,
itemsByCategoryId(categoryId: ID!, paginationRequest: PaginationRequest!): [Item!]!
itemById(itemId: ID!): Item!
}

extend type Mutation {
item(itemInput: ItemInput!): Item!
}
9 changes: 9 additions & 0 deletions src/main/resources/graphql/size.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,13 @@ type Size {
id: ID!
sizeType: SizeType!
value: String!
}

input SizeInput {
sizeType: SizeType!
value: String!
}

extend type Mutation {
size(sizeInput: SizeInput!): Size!
}

0 comments on commit a00df43

Please sign in to comment.