Skip to content

reynat/graphql-music-catalog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GraphQL Music Catalog

This repository contains a basic system of services to facilitate the introduction of GraphQL concepts, patterns, and best practices used in the Candidate Graph.

⚠️ This is not production ready code: This is for demonstration purposes only and should never be deployed.

Prerequisites

This tutorial assumes a basic understanding of Typescript and GraphQL principles.

Helpful tutorial links to get started with GraphQL:

Run locally

This repository contains two APIs, one for GraphQL and another for the resource Music API.

To set up the GraphQL API, open a new terminal in this repository and follow the steps below:

  1. Navigate to the graphql-api folder
cd graphql-api
  1. Set up the dependencies
yarn
  1. Startup service
yarn start

Repeat this on another terminal for music-api.

Service Location
GraphQL API localhost:4000
Music API localhost:8001

To confirm the system has been instantiated correctly, you can visit the GraphQL Playground where you can explore the current schema and test an example query.

Development

You will only be developing on the GraphQL API. nodemon will automatically restart the application when file changes in the directory are detected.

Tests can be run using

yarn test

Feel free to change the mock data in music-api/src/mock-data.ts if Taylor Swift and Blackpink aren't your cup of tea 😛.

TO DO

  • Custom scalar
  • Custom enum
  • Custom directive
  • RESTDataSource caching -> hit music api with a put
  • RESTDataSource batching

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published