- Node.JS 20.13
- yarn v4
- Docker (optional)
What's in the box?
- Apollo
- Express
- GraphQL
All dependencies are defined in package.json
and are managed with npm/yarn. To
initially install all dependencies and when the list dependency has changed,
run yarn install
.
$ yarn install
Start apollo server with hot reloading middleware listening on port 4000.
$ yarn start
Open http://localhost:4000/graphql-api/graphql
Paste this on the left side
{
subject(id: "urn:subject:1") {
name
topics {
name
meta {
metaDescription
}
subtopics {
name
}
}
}
}
Test framework: Jest.
$ yarn test
tl;dr: Use prettier and eslint!
Format code with prettier to get uniform codestyle:
$ yarn format
Lint code with eslint using yarn
:
$ yarn lint
Rules are configured in .eslintrc.js