/basic-graphql-server

A basic GraphQL server demonstrating resolvers and types

Primary LanguageJavaScriptMIT LicenseMIT

basic-graphql-server Build Statuscodecov

A bare bones GraphQL server

npm install yarn -g
yarn
yarn start or yarn test

Brief description

  • A Node GraphQL Express server
  • Start the server with yarn start and open localhost:4000 in your browser.
  • Experiment with GraphQL queries, an example is below and the types and available fields are visible in the Document Explorer
  • Code coverage report located in _build/report

Basic usage

Browse to localhost:4000 and enter some GraphQL queries:

{
	aspect(aspect: "16x9") {
		title
		posterPath
	}
	video(id: 2) {
		title
		id
		title
		ratio
		relatedVideos {
			title
			posterPath
		}
	}
	videos(aspect: "2x3") {
		title
		ratio
	}
}

Turtles all the way down usage

{
	video(id: 1){
	title,
	synopsis,
	posterPath,
	releaseDate,
	relatedVideos {
		title,
		relatedVideos {
			title,
			relatedVideos {
				title
			}
		}
	}
	}
}

Project developed using

  • Node

  • Express

  • GraphQL

  • Jest

  • Babel Node

  • ESLint

  • VSCode

  • Images and meta data courtesy of https://www.themoviedb.org/

  • This product uses the TMDb API but is not endorsed or certified by TMDb.

The Movie DB