create-graphql-service

1.0.2 • Public • Published

Create GraphQL Service

Create a GraphQL Federation without configurations.

Stack

Get started

  1. Install globally
npm install -g create-graphql-service
  1. Create your service
npx create-graphql-service my-graphql-service-name

// You'll be asked to fill the package.json prompt (as you do after running "npm init")
// Packages will be installed automatically and initial code scaffolding will be created
  1. Then you can finally start your service by running
cd my-graphql-service-name

// npm start:dev will add "development" as global variable
npm run start:dev

Then open http://localhost:3000/graphql to see and test your new service on GraphQL Playground.

Folder structure

src/
├── index.js              # App entry-point (starts server)
├── server.js             # Fastify instantiation
│
├── api
│   ├── example           # Example of an API entity folder
│   │   ├── index.js
│   │   └── resolver.js
│   └── index.js          # API entry-point (this file exports ALL API resolvers and TypeDefs)
│
├── plugins               # Fastify plugins
│   └── apollo-server.js
│
└── schema                # Schemas entry-point (exports a GraphQL Federated Schema)
    └── index.js             

Readme

Keywords

none

Package Sidebar

Install

npm i create-graphql-service

Weekly Downloads

7

Version

1.0.2

License

ISC

Unpacked Size

10.3 kB

Total Files

11

Last publish

Collaborators

  • gianlucasolinas