Preface | This repo has only purpose to make experiments with GraphQL by Strawberry. Dataset is retrieved from BreakingBad Api.
poetry install
cd breakingbad/
poetry run strawberry server breakingbad
Retrieve all characters
{
characters {
items {
name
nickname
occupation
}
}
}
All episodes with extra information on characters
{
episodes {
items {
title
season
series
characters {
name
nickname
}
}
}
}
{
deaths(responsible:{nickname: "Heisenberg"}) {
items{
death
cause
}
}
}
Preface | Pagination technique used is "Cursor Pagination" to obtain more performance and readability than Connection type skipping edge nodes
after
indicates the offset of query. [after
must be >= 0 ]first
indicate the number of results afterafter
element do you want [after
must be set if you usefirst
]
{
deaths(after:2,first:4) {
next
items{
deathId
cause
death
lastWords
responsible
}
}
}