/plushcap/analysis/hasura/updating-data-using-mutations-on-hasura-graphql-87c7e22503bc

Atomic set and increment operators for GraphQL mutations

What's this blog post about?

This article discusses atomic set and increment operators for mutations in GraphQL using Hasura GraphQL Engine. It explains how to update multiple objects in one shot with a powerful whereargument, which allows the creation of a boolean filter to select objects to be updated. The article also covers the use of setoperator to set or replace an existing value, and incrementoperator to atomically increment numerical values by a given amount to prevent race conditions. Additionally, it highlights native JSON/JSONB operators that can modify attributes in a JSON/JSONB value without needing to set the full JSON value.

Company
Hasura

Date published
Aug. 13, 2018

Author(s)
Anon Ray

Word count
591

Hacker News points
None found.

Language
English


By Matt Makai. 2021-2024.