How to upsert using GraphQL?

Yeah, I meant that. I thought that if Dgraph creates an “Update” it should behave as an “upsert”. But feels like it doesn’t. I haven’t used Dgraph’s GraphQL as much I should. I was assuming things that would make sense in my opinion and experience with GraphQL.

So, that’s exactly what a Custom DQL would do using the Upsert Block - So, you would create a specific GraphQL mutation for this.

Also, I think there is an internal ticket about Upsert Block natively in GraphQL, but not sure. I’ll check.

Humm, I was about to question that. It should at least throw an error in the Update mutation. Like “There is nothing to update”. That’s odd for me. Do we have a ticket about it? (on the issue/graphql part)

Update

I just have checked, there’s no ticket internally or here on discuss about the Upsert Behavior. Also, we should have one about the Update mutation, that it should throw an error in case the node doesn’t exists.