Skip to content

Yo-mah-Ya/Apollo-GraphQL-Example

Repository files navigation

This is a example repository of ApolloServer and ApolloClient

This repository consists 2 packages of backend with ApolloServer and frontend with ApolloClient as a monorepo.

Learn about GraphQL

Jump to docs directory

How the sample application work

Backend

Transpile TypeScript code to Node.js

yarn workspace backend compile

Run the code

yarn workspace backend start

Frontend

  • Development Environment
  1. create .env file like shown below
CDN_ENDPOINT=http://localhost:3000/graphql
LOG_LEVEL=DEBUG
  1. Run webpack-dev-server
./packages/frontend/dev.sh start
  • Production Environment
  1. Set up Environment values like .env

  2. Bundle code with Webpack

yarn workspace frontend compile --config --config webpack.prod.js