A temporary project to replicate the errors when connected to Directus.
- Run
yarn install
- Set
ADMIN_EMAIL
andADMIN_PASSWORD
indocker-compose.yml
- This will be your login to Directus
- Run
docker-compose up
- Navigate to Directus at
http://localhost:8055
and login - Click the user icon in bottom left corner.
- Scroll to bottom and set "Token" (Click check mark at top to save)
- Open
.meshrc.yaml
and put the "Token" value you chose after "Bearer"- e.g.
Authorization: Bearer ThisIsMyToken
- e.g.
- Navigate back to Directus and click the "Gear" icon, followed by "Data Model" in left hand menu.
- Create 3 data models in total.
- e.g.
lesson
,video
,article
- Don't worry about selecting anything, just click through after naming table
- e.g.
- For each data model, click "Create Field" and add a "Standard field" (just provide a name and click through).
- Create a "Many to Any" field on
lesson
data model namedsteps
, with allowed relations ofvideo
andarticle
. - Click the "Box" icon in left hand menu and create a record for every data model (collection)
- For the course record, add the lesson and article record as steps.
- Run
yarn graphql-mesh serve
- Query for
{
items {
lesson {
steps {
item {
... on video {
title
}
... on article {
title
}
}
}
}
}
}
- Uncomment each transform one at a time in
.meshrc.yaml
and re-run the above query (with necessary adjustments) to observe the errors.