Arguments
This example shows how to write field arguments in TypeScript interface.
ts
import { Graffle } from './graffle/__.js'
const atlas = Graffle.create()
const pokemons = await atlas.query.pokemons({
$: { filter: { name: { in: [`Pikachu`, `Charizard`] } } },
name: true,
trainer: { name: true },
})
console.log(pokemons)
Outputs
json
[
{
"name": "Pikachu",
"trainer": {
"name": "Ash"
}
},
{
"name": "Charizard",
"trainer": {
"name": "Ash"
}
}
]