Database collection filter by ID

Benjamin RabierBenjamin RabierJamie BartonJamie Barton
Database collection filter by ID

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

The Grafbase Database now supports filtering by multiple IDs when querying collections.

Consider the following schema:

import { g } from '@grafbase/sdk' g.model('Product', { name: g.string(), slug: g.string().unique(), })

This will automatically generate a new filter input that accepts a list of [ID!] values:

query { productCollection(first: 10, filter: { id: { in: ["...", "...", "..."] } }) { edges { node { name slug } } } }

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