You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 2, 2022. It is now read-only.
I would love a feature similar to what Graph.cool used to have with addTo function. Basically, when I run the function upsertNode and the node already exists, I don't want the update function to overwrite my node variables but have the option to add, subtract, multiply, or divide in case of floats and ints.
Why do I want this? Well if I already call upsertNode and my intention is to add two values, I don't want to know the value of existing node, I just care about adding my new value to it.
How could this feature look like in detail? Tradeoffs?
Consider this data model:
type User {
id: ID! @unique
name: String!
numberOfLives: Int!
}
Suggestion
Add special parameters such as add, subtract, multiply, and divide as allowed update input
That's correct. The update part of upsert mutations have the same capabilities as normal update mutations, so when this feature lands it will also work for upserts.
Feature Request
What feature are you missing?
I would love a feature similar to what Graph.cool used to have with
addTo
function. Basically, when I run the functionupsertNode
and the node already exists, I don't want the update function to overwrite my node variables but have the option to add, subtract, multiply, or divide in case of floats and ints.Why do I want this? Well if I already call
upsertNode
and my intention is to add two values, I don't want to know the value of existing node, I just care about adding my new value to it.How could this feature look like in detail? Tradeoffs?
Consider this data model:
Suggestion
Add special parameters such as
add
,subtract
,multiply
, anddivide
as allowed update inputThe text was updated successfully, but these errors were encountered: