Currently, we don't update the value property on update mutation when the value field is not requested to be returned on response. This is not acceptable, and we need to fix it. We were not able to solve this problem in https://github.com/capactio/capact/issues/645 as we run of time.
Options
We pick option 1:
1. Move code to the update mutation resolver, but this will make the transaction handling harder. This will be done before the query will be executed. In case of failed query, we won't be able to remove it from external storage.
Add DeleteRevision for storage backends
Update docs to mention new gRPC method
~1. On update mutation, return only id and alias. Same as we do on create mutation. It is the simplest solution, but significantly degrades usability.~
in Go client, run update + get in a single HTTP call
~1. Manipulate the query fields. If user didn't ask for value add it on request, and remove it on response.~
This is the most hack-ish way of solving this problem.
Expected behavior
The value property is always updated, and it doesn't depend on the user query return fields.
Actual behavior
If the value is not requested on the GQL response, the value is not updated.
Description
Currently, we don't update the
value
property onupdate
mutation when thevalue
field is not requested to be returned on response. This is not acceptable, and we need to fix it. We were not able to solve this problem in https://github.com/capactio/capact/issues/645 as we run of time.Options
We pick option 1:
1. Move code to the
update
mutation resolver, but this will make the transaction handling harder. This will be done before the query will be executed. In case of failed query, we won't be able to remove it from external storage.~1. On
update
mutation, return onlyid
andalias
. Same as we do oncreate
mutation. It is the simplest solution, but significantly degrades usability.~~1. Manipulate the query fields. If user didn't ask for
value
add it on request, and remove it on response.~Expected behavior
The
value
property is always updated, and it doesn't depend on the user query return fields.Actual behavior
If the
value
is not requested on the GQL response, thevalue
is not updated.Related issues
See epic #604 for reason and use cases.