Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

NDLANO/graphql-api

Repository files navigation

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

Paste this on the left side

{
 subject(id: "urn:subject:1") {
 name
 topics {
 name
 meta {
 metaDescription
 }
 subtopics {
 name
 }
 }
 }
}

Unit tests

Test framework: Vitest.

$ yarn test

Code style

tl;dr: Use oxfmt and eslint!

Format code with oxfmt to get uniform codestyle:

$ yarn format

Lint code with eslint using yarn:

$ yarn lint

Rules are configured in .eslintrc.js

About

Query all the apis

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 24

Languages

AltStyle によって変換されたページ (->オリジナル) /