Skip to content

Commit a5a949c

Browse files
author
Marwa
committed
feat: add pdc categories to allproducts and VAC Items query
1 parent e700c78 commit a5a949c

2 files changed

Lines changed: 69 additions & 0 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@frameless/overige-objecten-api": minor
3+
---
4+
5+
Include `pdc_category` and `pdc_subcategories` relations in the `getAllProducts` GraphQL query.

apps/overige-objecten-api/src/queries/index.ts

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,22 @@ query getAllProducts(
3232
slug
3333
uuid
3434
locale
35+
pdc_subcategories{
36+
data{
37+
id
38+
attributes{
39+
pdc_category{
40+
data{
41+
id
42+
attributes{
43+
title
44+
}
45+
}
46+
}
47+
title
48+
}
49+
}
50+
}
3551
updatedAt
3652
createdAt
3753
locale
@@ -262,6 +278,22 @@ export const GET_PRODUCT_BY_UUID = gql(`
262278
slug
263279
uuid
264280
locale
281+
pdc_subcategories{
282+
data{
283+
id
284+
attributes{
285+
pdc_category{
286+
data{
287+
id
288+
attributes{
289+
title
290+
}
291+
}
292+
}
293+
title
294+
}
295+
}
296+
}
265297
updatedAt
266298
createdAt
267299
locale
@@ -686,6 +718,22 @@ query getAllVacItems($page: Int, $pageSize: Int, $start: Int, $limit: Int) {
686718
createdAt
687719
updatedAt
688720
title
721+
subcategories{
722+
data{
723+
id
724+
attributes{
725+
title
726+
pdc_category{
727+
data{
728+
id
729+
attributes{
730+
title
731+
}
732+
}
733+
}
734+
}
735+
}
736+
}
689737
contact_information_internal {
690738
data {
691739
attributes {
@@ -754,6 +802,22 @@ query getVacItemByUUID($uuid: String) {
754802
createdAt
755803
updatedAt
756804
title
805+
subcategories{
806+
data{
807+
id
808+
attributes{
809+
title
810+
pdc_category{
811+
data{
812+
id
813+
attributes{
814+
title
815+
}
816+
}
817+
}
818+
}
819+
}
820+
}
757821
contact_information_internal {
758822
data {
759823
attributes {

0 commit comments

Comments
 (0)