Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ndlano/graphql-api
Query all the apis
https://github.com/ndlano/graphql-api
Last synced: about 5 hours ago
JSON representation
Query all the apis
- Host: GitHub
- URL: https://github.com/ndlano/graphql-api
- Owner: NDLANO
- License: gpl-3.0
- Created: 2018-04-13T13:35:35.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-04-10T12:53:50.000Z (7 months ago)
- Last Synced: 2024-04-11T06:43:05.475Z (7 months ago)
- Language: TypeScript
- Size: 2.58 MB
- Stars: 4
- Watchers: 6
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NDLA GraphQL server
## Requirements
- Node.JS 20.13
- yarn v4
- Docker (optional)## Getting started
What's in the box?
- Apollo
- Express
- GraphQL### Dependencies
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 development server
Start apollo server with hot reloading middleware listening on port 4000.
```
$ yarn start
```Open [http://localhost:4000/graphql-api/graphql](http://localhost:4000/graphql-api/graphql)
Paste this on the left side
```graphql
{
subject(id: "urn:subject:1") {
name
topics {
name
meta {
metaDescription
}
subtopics {
name
}
}
}
}
```### Unit tests
Test framework: Jest.
```
$ yarn test
```### Code style
_tl;dr_: Use prettier and eslint!
Format code with prettier to get uniform codestyle:
```
$ yarn format
```Lint code with [eslint](http://eslint.org/) using `yarn`:
```
$ yarn lint
```Rules are configured in [.eslintrc.js](./.eslintrc.js)