Skip to content

Sasmita07/poc-apollo-v4-graphql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

poc-apollo-v4-graphql

GraphQL Modules with Apollo Server v4 example

The purpose if this repo is to demonstrate how to implement a GraphQL Modules API with the following tech stack:

It contains below folder structure:

File or Folder Purpose
src/modules graphQL modules
src/integrations fetching from datasorce
package.json project metadata and configuration
readme.md this getting started guide

Running Locally

  • Install node modules in root folder npm install
  • Run npm run start to start app
  • Run app in the browser which is usually http://localhost:4000

GraphQL Code-Generator

  • GraphQL Code-Generator which helps you create types (and more) based on your GraphQL schema using graphql-modules-preset and typescript-resolvers
  • Add codegen.ts in the root folder. Follow the config setup.
  • Run npm run graphql-types-generate to generate types