Query by unique

Yoav LaviYoav LaviJamie BartonJamie Barton
Query by unique

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

We just released support for querying data by a @unique field — learn more.

Any fields you set as @unique will automatically update the input type for the query to fetch by ID, or unique field.

This change means that how you previously queried by id must now be provided to the by argument.

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

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