I am new to strapi and graphle.
I’m inserting a new record using the playground like this -
mutation {createProduct(data:{name:“cat”,description:“black”,}
)
{data{id attributes{ name description images{data {attributes{url} }
}} } }
}
record is added normally
but I want to insert one or more images with links in Multiple media field, so -
mutation push{
createProduct(data:{name:“cat2”,description:“differents”,
images:[ “https://res.cloudinary.com/dxzefnveb/image/upload/v1650342675/johnny_automatic_girls_hair_style_1_369ca22d18_1_0380b092bc.svg”,
]
}
)
{data{id attributes{ name description images{data {attributes{url} }
}} } }
}
and get
“errors”: [
{
“message”: “insert into files_related_morphs
(field
, file_id
, order
, related_id
, related_type
) values (‘images’, ‘https://res.cloudinary.com/dxzefnveb/image/upload/v1650342675/johnny_automatic_girls_hair_style_1_369ca22d18_1_0380b092bc.svg’, 1, 26, ‘api::product.product’) - FOREIGN KEY constraint failed”
at the same time, a record with text fields is added, only the image field is not added
how can i fix this?