hi guys in the pokedex tutorial the API that is cr...
# prisma-whats-new
j
hi guys in the pokedex tutorial the API that is created it gives me this in the docs -> Trainer(id: ID name: String): Trainer how do i pass a name as argument in my own api? I only get the ID.
n
@joao.santos Hey Joao 🙂 You can use any unique field to select a single node
so you can set the
name
field to unique
j
lol, tryed everything else, never thought it was that... thx again @nilan 😄
n
🙂
does that make sense for your field?
if you cannot make it unique, you can use the
allTrainers
query instead
j
yeah i know, but i was trying to repliicate the tutorial with my own api, and this was bothering me 😄
n
ok cool, just wanted to make sure 🙂
👍 1
j
thx 😄