| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Created from fullstack graphql, implement additional support for Typescript, Angular CLI and ngrx.
Simple Demo Application
API built with Node + Express + GraphQL + Sequelize (supports MySQL, Postgres, Sqlite and MSSQL).
WebApp built with Angular CLI + Redux + Async Middleware.
Written in Typescript using Babel + Angular CLI.
[nodemon] starting `babel-node src/index.js --presets es2015,stage-2` SETUP - Connecting database... SETUP - Loading modules... SETUP - GraphQL... SETUP - Syncing database tables... INFO - Database connected. INFO - Database sync complete. SETUP - Starting server... INFO - Server started on port 3000.
fullstack-graphql-angular ├── api (api.example.com) │ ├── src │ │ ├── config │ │ ├── models │ │ ├── schema │ │ ├── setup │ │ └── index.js │ │ │ └── package.json │ ├── webapp (example.com) │ ├── public │ ├── src │ │ └── app │ │ ├──@core │ │ ├──@shared │ │ ├──pages │ │ └──app.module.ts │ │ │ └── package.json │ ├── .gitignore └── README.md
These queries are generated on client side using queryBuilder() helper defined in /webapp/src/app/@shared/utils/helpers.ts
|
Query - Get List query {
thoughts {
id,
name,
thought
}
}
|
Response {
"data": {
"thoughts": [
{
"id": 1,
"name": "Arya Stark",
"thought": "A girl has no name"
},
{
"id": 2,
"name": "Jon Snow",
"thought": "I know nothing"
}
]
}
}
|
|
Query - Get by Param query {
thought(id: 1) {
id,
name,
thought
}
}
|
Response {
"data": {
"thought": {
"id": 1,
"name": "Arya",
"thought": "A girl has no name"
}
}
}
|
|
Mutation - Create mutation {
thoughtCreate(
name: "Tyrion Lannister",
thought:"I drink and I know things"
) {
id
}
}
|
Response {
"data": {
"thoughtCreate": {
"id": 3
}
}
}
|
|
Mutation - Remove mutation {
thoughtRemove(id: 3) {
id
}
}
|
Response {
"data": {
"thoughtRemove": {
"id": null
}
}
}
|
| Back | FazBrowse Home | New Git URL |