Клиент Apollo + graphql + ошибка api-платформы после выполнения запроса
В моем приложении на платформе api с конечной точкой graphql я делаю следующую мутацию на сервере
export const UPDATE_ITEM_MUTATION = function () {
return gql`
mutation($id:ID!,$nombre:String!,$codigoReeup: String,$categoria: String,$organismo: String,$abreviatura:String,$descripcion:String,$observaciones:Iterable,
$domicilioLegal:String,$clientMutationId: String!,$telefonos:Iterable,$emails:Iterable,$sitioWeb:String)
{
updateCliente(
input:{
id: $id,nombre: $nombre,codigoReeup:$codigoReeup,categoria:$categoria,abreviatura:$abreviatura,descripcion:$descripcion,organismo:$organismo,
observaciones:$observaciones,domicilioLegal:$domicilioLegal,
clientMutationId:$clientMutationId,telefonos:$telefonos,emails:$emails,sitioWeb:$sitioWeb
})
{
id,nombre,abreviatura,codigoReeup,descripcion,observaciones,ultimaDocEntregadaAt,domicilioLegal,organismo{denominacion},
categoria{denominacion},telefonos,emails,sitioWeb
}
}`
}
после успешной мутации я возвращаюсь на страницу списка клиентов, а затем выполняется этот запрос:
`
{ clientes(order:${order})
{ edges
{
node
{
id,nombre,abreviatura,codigoReeup,descripcion,observaciones,ultimaDocEntregadaAt,domicilioLegal,telefonos,emails,sitioWeb,
organismo{denominacion},categoria{denominacion}
}
}
}
}`
после ответа сервера 200 кода с ожидаемым обновленным аполлоном выдает этот стек ошибок
Обновлено: добавлена ошибка
Error: "Network error: Error writing result to store for query: {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","variableDefinitions":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"clientes"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"order"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"nombre"},"value":{"kind":"StringValue","value":"ASC","block":false}}]}}],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"edges"},"arguments":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"node"},"arguments":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"nombre"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"abreviatura"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"codigoReeup"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"descripcion"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"observaciones"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"ultimaDocEntregadaAt"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"domicilioLegal"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"telefonos"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"emails"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"sitioWeb"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"organismo"},"arguments":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"denominacion"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"__typename"}}]}},{"kind":"Field","name":{"kind":"Name","value":"categoria"},"arguments":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"denominacion"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"__typename"}}]}},{"kind":"Field","name":{"kind":"Name","value":"__typename"}}]}},{"kind":"Field","name":{"kind":"Name","value":"__typename"}}]}},{"kind":"Field","name":{"kind":"Name","value":"__typename"}}]}}]}}],"loc":{"start":0,"end":310}}
Store error: the application attempted to write an object with no provided id but the store already contains an id of Organismo:/api/organismos/50b4a4b2-638d-486e-80e0-bab276a722e5 for this object. The selectionSet that was trying to be written is: {"kind":"Field","name":{"kind":"Name","value":"organismo"},"arguments":[],"directives":[],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"denominacion"},"arguments":[],"directives":[]},{"kind":"Field","name":{"kind":"Name","value":"__typename"}}]}}"
Кажется, что ошибка записи в своем собственном кэше
Любой совет, после этого ничего не работает
заранее спасибо
Примечание: я не делаю никаких других запросов для запроса этого организма