'Check before calling add in Graphql

We are running an add state in graphql. But before this statement is called, would like to check if the value already exists.

Any way to create a query that checks existence and then adds?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source