dehaze

Distinct query results

You can fetch the distinct/unique values of a particular field via Space Cloud by using the distinct argument.

Example: Get all the distinct pokemon types:

query {
  pokemons(
    distinct: "type"
  ) @mongo {
    type
  }
}
const { status, data } = await db.get("pokemons")
  .distinct("type")
  .apply()

Have a technical question?

Improve the docs!