Update FilterHistory.isFavorite
Query:
mutation {
updateFilterHistory(input: {
isFavorite: true,
id: "/tmd/api/index.php/filter_histories/1",
})
{
filterHistory {
label
filter
isFavorite
}
}
}
führt zu folgendem Fehler:
{
"errors": [
{
"debugMessage": "label: String already exists. ID: {1}",
"message": "label: String already exists. ID: {1}",
"extensions": {
"category": "user",
"status": 422,
"violations": [
{
"path": "label",
"message": "String already exists. ID: {1}"
}
]
},
"locations": [
{
"line": 2,
"column": 3
}
],
"path": [
"updateFilterHistory"
],
"trace": [
{
"file": "\/www-data\/vendor\/api-platform\/core\/src\/GraphQl\/Resolver\/Stage\/ValidateStage.php",
"line": 48,
"call": "ApiPlatform\\Core\\Bridge\\Symfony\\Validator\\Validator::validate(instance of App\\Entity\\FilterHistory, array(1))"
},
{
"file": "\/www-data\/vendor\/api-platform\/core\/src\/GraphQl\/Resolver\/Factory\/ItemMutationResolverFactory.php",
"line": 120,
"call": "ApiPlatform\\Core\\GraphQl\\Resolver\\Stage\\ValidateStage::__invoke(instance of App\\Entity\\FilterHistory, 'App\\Entity\\FilterHistory', 'update', array(6))"
},
{
"file": "\/www-data\/vendor\/webonyx\/graphql-php\/src\/Executor\/ReferenceExecutor.php",
"line": 632,
"call": "ApiPlatform\\Core\\GraphQl\\Resolver\\Factory\\ItemMutationResolverFactory::ApiPlatform\\Core\\GraphQl\\Resolver\\Factory\\{closure}(null, array(1), null, instance of GraphQL\\Type\\Definition\\ResolveInfo)"
},
AC
-
Fehler fixed, mutation führt zu keinem Fehler -
Test
Review
-
Fehler fixed, mutation führt zu keinem Fehler -
Test
Edited by Michael Voigt