All Projects → tomyitav → create-graphql-app

tomyitav / create-graphql-app

Licence: MIT license
Cli tool for bootstrapping serverless GraphQL api

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to create-graphql-app

Apollo Server Vercel
⚫ Production-ready Node.js GraphQL server for Vercel Serverless Functions
Stars: ✭ 69 (+146.43%)
Mutual labels:  apollo, apollo-server
Portara
Portara directive is a rate limiter / throttler for GraphQL
Stars: ✭ 158 (+464.29%)
Mutual labels:  apollo, apollo-server
React Hipstaplate
A ReactJS full-stack boilerplate based on typescript with ssr, custom apollo-server and huge stack of modern utilities which will help you to start your own project
Stars: ✭ 74 (+164.29%)
Mutual labels:  apollo, apollo-server
Graphql Modules
Enterprise Grade Tooling For Your GraphQL Server
Stars: ✭ 962 (+3335.71%)
Mutual labels:  apollo, apollo-server
Todo-apollo-redux-react-native
Todo App with apollo + redux + react-native
Stars: ✭ 15 (-46.43%)
Mutual labels:  apollo, apollo-server
Graphql Apq
🎯 Automatic persisted queries (APQ) for any GraphQL server.
Stars: ✭ 43 (+53.57%)
Mutual labels:  apollo, apollo-server
Awesome Apollo Graphql
A curated list of amazingly awesome things regarding Apollo GraphQL ecosystem 🌟
Stars: ✭ 126 (+350%)
Mutual labels:  apollo, apollo-server
apollo-error-converter
Global Apollo Server Error handling made easy. Remove verbose and repetitive resolver / data source Error handling. Automatic Error catching, logging, and conversion to ApolloErrors.
Stars: ✭ 16 (-42.86%)
Mutual labels:  apollo, apollo-server
bookshelf
My GraphQL playground
Stars: ✭ 64 (+128.57%)
Mutual labels:  apollo, apollo-server
future-of-gql-servers
The future of GraphQL servers (GraphQL Europe 2018)
Stars: ✭ 27 (-3.57%)
Mutual labels:  apollo, apollo-server
Chatty
A WhatsApp clone with React Native and Apollo (Tutorial)
Stars: ✭ 481 (+1617.86%)
Mutual labels:  apollo, apollo-server
Heighliner
A GraphQL Server for NewSpring Web
Stars: ✭ 13 (-53.57%)
Mutual labels:  apollo, apollo-server
Firestore Apollo Graphql
An example of a GraphQL setup with a Firebase Firestore backend. Uses Apollo Engine/Server 2.0 and deployed to Google App Engine.
Stars: ✭ 371 (+1225%)
Mutual labels:  apollo, apollo-server
Graphql Advanced Projection
Fully customizable Mongoose/MongoDB projection generator.
Stars: ✭ 46 (+64.29%)
Mutual labels:  apollo, apollo-server
now-course
Proyecto para el curso de Now.sh en Platzi
Stars: ✭ 19 (-32.14%)
Mutual labels:  apollo, apollo-server
Apollo Prophecy
🔮 GraphQL error management made Easy, generate custom machine-readable errors for Apollo Client/Server from the CLI
Stars: ✭ 83 (+196.43%)
Mutual labels:  apollo, code-generation
kontent-boilerplate-express-apollo
Kontent Boilerplate for development of Express application using Apollo server and GraphQL.
Stars: ✭ 21 (-25%)
Mutual labels:  apollo, apollo-server
apollo-chat-graphql-server
Apollo Chat is a Chat Service build on GraphQL Apollo with Subscriptions
Stars: ✭ 13 (-53.57%)
Mutual labels:  apollo, apollo-server
Sqldatasource
SQL DataSource for Apollo GraphQL projects
Stars: ✭ 176 (+528.57%)
Mutual labels:  apollo, apollo-server
apollo-log
A logging extension for the Apollo GraphQL Server
Stars: ✭ 64 (+128.57%)
Mutual labels:  apollo, apollo-server

create-graphql-app

Build Status Coverage Status npm MIT licensed code style: prettier semantic-release renovate-app badge

Cli tool for bootstrapping production grade GraphQL server, using:

  • typescript
  • apollo-server 2
  • graphql-code-generator
  • merge-graphql-schemas
  • Dependency injection with injection-js

Installation

Please make sure you have Node.js version 8+, and type

npm install -g create-graphql-app

CLI commands

Init server command

Open shell in the desired folder for bootstrapping the server, and typed:

cga init <project-name>

The command will prompt available server seeds options. Choose the boilerplate project you want, and start coding!

Generate server resolver files

The server boilerplate code is designed as multi file schema definitions. Our recommended way for schema design is to create a type file for certain entity. Eventually, all entities schemas are merged. To generate a matching resolver file for type file, execute the command:

cga r <type-file> <resolver file>

This will create a matching file, with all Query, Mutation and Subscription definitions.

Generate services

Our server resolvers should operate as a thin layer, or controller, that links between the schema, and the server business logic. We use services for our model, to perform logic such as api fetching, db operations, etc. In order to create a new service, run the command:

cga s <service-path> [--ignoreContext]

This will create a new service file to services directory. Also, it will register the service on the server injector file, and will add its definition to the context object, thus allowing its usage by resolvers. You can exclude context file additions by passing the ignoreContext flag.

Deploy server to production

Inside the project directory, type:

cga d

This will run the server deploy script, and will move the server to production! 🚀

Extended documentation

Please check out the extended documentation for more information

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].