Here is the thing, I'm building a simple inventory app that has products and parts. Products can have many parts and part can be in many Products.
I'm using React and GraphQL with Strapi backend and I want to update a product to add or remove certain products.
I can't go pass this error in GraphQL playground:
ID cannot represent a non-string and non-integer value:
I've tried with id: 1, id: "1", id: 1
, id: "1"
nothing works. Here is the Docs for the input:
I'm trying like this but it doesn't work:
mutation {
updateProduct (input:{
where:{
id: 2
}
data: {
parts: [
{
id: 3
}
]
}
}){
product{
id
productName
parts {
id
partName
}
}
}
}
I'd appreciate any help,
Thanks
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…