0.1.3 • Published 5 years ago
generator-web-app-with-graphql v0.1.3
This is Yeoman generator for fast creation web-app with:
- React
- ApolloClient
- Graphql
- Material-ui
It generates web app with authorization
It is fully compatible with this server side:
npm i generator-apollo-server-with-mongodbhttps://github.com/Krill221/generator-apollo-server-with-mongodb
Get started:
To generate new app type in console:
npm install -g npm
npm install -g yo
npm install -g generator-web-app-with-graphql
yo web-app-with-graphqlthan follow instructions
To start local server with web-app simply type in console:
yarn sIt also has simple generators:
To add new model (for example for model "Post") simply type in console:
yarn add-model Post name:String desc:StringTo add new fields to model type in console:
yarn add-fields Post body:String img:StringTo delete fields from model type in console:
yarn delete-fields Post body:String img:StringTo add new has-one relation field to model type in console:
yarn add-has-one Post Comment name:String desc:StringTo delete has-one relation field from model type in console:
yarn delete-has-one Post CommentTo add new has-many relation field to model type in console:
yarn add-has-many Post CommentTo delete has-many relation field to model type in console:
yarn delete-has-many Post CommentTo add estimates array field to model type in console:
yarn add-estimates Post like:Float stars:FloatTo delete estimates array field to model type in console:
yarn delete-estimates Post like:Float stars:FloatTo add location fields to model type in console:
yarn add-locations Post location1:Location location2:LocationTo delete location fields to model type in console:
yarn delete-locations Post location1:Location location2:Location