Update and Delete by unique fields

Yoav LaviYoav LaviJamie BartonJamie Barton
Update and Delete by unique fields

The Grafbase Database is deprecated. Use connectors to federate your existing data sources.

We just released support for updating and deleting data by @unique fields — learn more.

Any fields you set as @unique will automatically update the input type used for update and delete mutations.

This change means that how you previously used mutations to update or delete by id must now use the new by argument.

Here's how the new mutations work for a model named Post:

type Post @model { title: String! slug: String! @unique }
Youtube video thumbnail
  • The id argument no longer exists for query, update or delete. You have to use the new by argument.
  • Grafbase CLI 0.11.0 has been released to include all of the above.

We'd love to hear your feedback and ideas, so join us on Discord.