Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tonyfromundefined/workshop-serverless-graphql
๐ฃ [AWSKRUG Serverless Group 2019] Serverless GraphQL Workshop
https://github.com/tonyfromundefined/workshop-serverless-graphql
aws awskrug express fargate lambda nextjs nexus prisma serverless
Last synced: 20 days ago
JSON representation
๐ฃ [AWSKRUG Serverless Group 2019] Serverless GraphQL Workshop
- Host: GitHub
- URL: https://github.com/tonyfromundefined/workshop-serverless-graphql
- Owner: tonyfromundefined
- Created: 2019-06-14T03:11:14.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-07-15T13:55:22.000Z (over 2 years ago)
- Last Synced: 2024-08-05T04:04:38.086Z (3 months ago)
- Topics: aws, awskrug, express, fargate, lambda, nextjs, nexus, prisma, serverless
- Language: TypeScript
- Homepage:
- Size: 29.6 MB
- Stars: 80
- Watchers: 3
- Forks: 24
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ์๋ฒ๋ฆฌ์ค GraphQL ์ํฌ์ต ๐จ
์๋ฒ๋ฆฌ์ค GraphQL ์ํฌ์ต์ ์ค์ ์ฌ๋ฌ๋ถ์ ํ์ํฉ๋๋ค!์ด ์ํฌ์์ ๊ธฐ์กด์ GraphQL์ ๋ํ ๋ฐฐ๊ฒฝ์ด ์๋ ๋ถ๋ค์ ์ํด ์ค๋น๋์์ต๋๋ค. GraphQL ๋ฐฑ์๋์ ๋ํ ๊ฐ์ฅ ๊ธฐ์ด์ ์ธ ํต์ฌ ๊ฐ๋ ์ ๋ด์์ผ๋ฉฐ, ์ค์ Production์์ ์ฌ์ฉ๋๋ ๋๊ตฌ๋ค์ ์๊ฐํ๋ฉฐ Production ๋ ๋ฒจ์์์ GraphQL์ด ๊ฐ์ง ํต์ฌ ๊ฐ์น๊ฐ ๋ฌด์์ธ์ง ๋ฐฐ์ฐ๊ณ , ๋ฐ๋ผํ ์ ์๋ ์๊ฐ์ ๊ฐ์ง๋๋ค.
![](./full-architecture-3.png)
> ๋ณธ ์ํฌ์ต์ AWSKRUG ์๋ฒ๋ฆฌ์ค ๋ชจ์์ด ์ฃผ์ตํฉ๋๋ค. [์ฐธ๊ฐ์ ์ฒญ](https://www.meetup.com/ko-KR/awskrug/events/262459287/)
>
> ๐ Written with ๐ฅ by [Tony](https://github.com/tonyfromundefined)## ์ด๋ฐ ๊ธฐ์ ์คํ์ด ์ฌ์ฉ๋์์ด์ ๐ง
### ์ธ์ด ๋ฐ ํ๊ฒฝ
- [TypeScript](https://www.typescriptlang.org) ๐
- [Node.js](https://nodejs.org/en/about/)
- [Babel](https://babeljs.io)
- [Webpack](https://webpack.js.org/)
- [Dotenv](https://github.com/motdotla/dotenv)### API ์๋ฒ
- [Express.js](https://expressjs.com/ko/)
- [Apollo Server](https://www.apollographql.com/docs/apollo-server/)
- [Prisma Nexus](https://nexus.js.org/) ๐
- [Serverless Framework](https://serverless.com)
- [AWS API Gateway](https://aws.amazon.com/ko/api-gateway/)
- [AWS Lambda](https://aws.amazon.com/ko/lambda/)
- [AWS S3](https://aws.amazon.com/ko/s3/)### Data Loader + ORM
- [Docker](https://www.docker.com/)
- [Prisma](https://www.prisma.io/) ๐
- [AWS Fargate](https://aws.amazon.com/ko/fargate/) ๐### Database
- [MySQL](https://www.mysql.com/)
- [AWS Aurora Serverless](https://aws.amazon.com/ko/rds/aurora/serverless/)
- [AWS RDS](https://aws.amazon.com/ko/rds/)### Web Client
- [React.js](https://reactjs.org/)
- [Next.js](https://nextjs.org/)
- [Apollo Client](https://github.com/apollographql/apollo-client)
- [React Apollo](https://github.com/apollographql/react-apollo)
- [React Apollo Hooks](https://github.com/trojanowski/react-apollo-hooks)
- [GraphQL Code Generator](https://graphql-code-generator.com) ๐
- [MobX 5](https://github.com/mobxjs/mobx)### ๊ธฐํ
- [AWS CloudFormation](https://aws.amazon.com/ko/cloudformation/)## ๋ฏธ๋ฆฌ ์ค๋นํด์ฃผ์ธ์
### 0. ๋ณธ Github Repository๋ฅผ ๋ณธ์ธ์ ์ปดํจํฐ์ ๋ณต์ฌํด์ฃผ์ธ์
์ค๊ฐ์ค๊ฐ ์ค์ต์ ํ์ํ ํ์ผ๋ค์ด ์ ๋ก๋ ๋์ด์์ต๋๋ค. ์ธ์ ์์ ์ ๋ฏธ๋ฆฌ ๋ค์ด ๋ฐ์์ฃผ์ธ์.
- `.zip` ํ์ผ๋ก [๋ค์ด๋ก๋](https://github.com/tonyfromundefined/serverless-graphql-workshop/archive/master.zip)
- ๋๋
```bash
$ git clone https://github.com/tonyfromundefined/serverless-graphql-workshop
```### 1. PC ๋๋ Mac
๋ณธ ์ธ์ ์ ์ฝ๋ฉ ๊ณผ์ ์ด ํฌํจ๋์ด ์์ต๋๋ค. ๋ํ CLI(Command Line Interface) ์กฐ์์ด ๊ผญ ํ์ํฉ๋๋ค. ๋ชจ๋ฐ์ผ ํ๊ฒฝ(iPhone, iPad, Android)์์๋ ์งํ์ด ๋ถ๊ฐ๋ฅํ๋ ๊ผญ PC/Mac ํ๊ฒฝ์์ ์งํํ์ธ์.### 2. AWS ๊ณ์
- AWS ๊ณ์ ๋ง๋ค๊ธฐ [์ด๋](https://aws.amazon.com/ko/)๋ณธ ๊ฐ์ด๋๋ ํ๋ช ์ด ํ๋์ AWS ๊ณ์ ์ ์ฌ์ฉํ๋ค๊ณ ๊ฐ์ ํฉ๋๋ค. AWS API Gateway, Lambda, ECS, RDS, S3, CloudWatch์ ์ ๊ทผํ ์ ์์ด์ผ ํ๋ฉฐ, ๋ค๋ฅธ ์ฌ๋๊ณผ ๊ณ์ ์ ๊ณต์ ํ๊ฒ ๋๋ฉด ํน์ ๋ฆฌ์์ค์ ๋ํด ์ถฉ๋์ด ๋ฐ์ ํ ๊ฐ๋ฅ์ฑ์ด ์์ผ๋ฏ๋ก ๊ถ์ฅํ์ง ์์ต๋๋ค.
#### [์ค์] ๋ณธ ์ํฌ์ต์์ ์ฌ์ฉํ๋ 'AWS Fargate' ์๋น์ค๋ **๊ณผ๊ธ**๋ฉ๋๋ค. ์ค์ต์ด ๋๋๊ณ ๋ฐ๋ก ์ญ์ ํ์ธ์.
**AWS Fargate๋ฅผ ์ ์ธํ** ๋ณธ ์ํฌ์ต์ ์ผํ์ผ๋ก ์์ํ๋ ๋ชจ๋ ๋ฆฌ์์ค๋ AWS ๊ณ์ ์ด 12๊ฐ์ ๋ฏธ๋ง์ธ ๊ฒฝ์ฐ, ์ ๊ณตํ๋ AWS ํ๋ฆฌํฐ์ด๋ก ์ถฉ๋ถํ ๊ฐ๋ฅํฉ๋๋ค. ๋จ, ์ฌ์ฉ๋์ด ํ๋ฆฌํฐ์ด๋ฅผ ๋์ด์๋ ๊ฒฝ์ฐ, ๊ณผ๊ธ ๋ ์๋ ์์ต๋๋ค. ๋ฐ๋ผ์, ์๋ก์ด ์ค์ต์ฉ ๊ณ์ ์ ๋ง๋์๊ธธ ๊ถ์ฅํฉ๋๋ค. ์์ธํ ๋ด์ฉ์ [AWS ํ๋ฆฌ ํฐ์ด ํ์ด์ง](https://aws.amazon.com/free/)๋ฅผ ์ฐธ์กฐํ์ธ์.
### 3. ์น ๋ธ๋ผ์ฐ์
- Chrome ์ต์ ๋ฒ์ [๋ค์ด๋ก๋](https://www.google.com/chrome/)> Internet Explorer๋ AWS Web Console์์ ๋ฌธ์ ๊ฐ ๋ฐ์ํ ์ ์์ต๋๋ค.
### 4. ํ ์คํธ ์๋ํฐ
- VS Code [๋ค์ด๋ก๋](https://code.visualstudio.com/)๋ณธ ์ค์ต ์ธ์ ์๋ ์ค์ ์ฝ๋ฉ์ด ํฌํจ๋ฉ๋๋ค. ์ธ์ ๋ฐํ์๋ VS Code๋ฅผ ์ฌ์ฉํ๋, ์ฝ๋ฉ์ ์ต์ํ์ง ์์ผ์ ๋ถ์ ๋ฐ๋ผํ๊ธฐ ์ฝ๋๋ก ํ๊ฒฝ์ ๋์ผํ๊ฒ ์ค์ ํด์ฃผ์ธ์.
### 5. Node.js
- Node.js ์ต์ ๋ฒ์ [๋ค์ด๋ก๋](https://nodejs.org/en/)## ์ ๊ทธ๋ผ ์ด์ ์์ํด๋ณผ๊น์?
1. [GraphQL ์ดํด๋ณด๊ธฐ](/documents/1-graphql/README.md)
1. GraphQL์ด๋?
2. GraphQL Type ์์คํ ๊ณผ `Query`, `Mutation` Type
3. Nexus๋ก ์์ํ๋ *Code-First* GraphQL ๊ฐ๋ฐ
4. GraphQL Playground
5. `Task` ํ์ ๊ณผ ์ฟผ๋ฆฌ, ๋ฎคํ ์ด์ ๋ง๋ค๊ธฐ
2. [Serverless๋ก GraphQL API ๋ฐฐํฌํ๊ธฐ](/documents/2-serverless/README.md)
1. IAM ์ฌ์ฉ์ ์์ฑํ๊ธฐ
2. Serverless Framework์ ์ฌ์ฉํด Node.js ํ๋ก์ ํธ ๋ฐฐํฌํ๊ธฐ
3. [AWS์ Prisma ๋ฐฐํฌํ๊ธฐ (CloudFormation)](/documents/3-prisma-on-aws/README.md)
4. [Prisma ์ฌ์ฉํ๊ธฐ](/documents/4-prisma/README.md)
1. Prisma๋?
2. Prisma ์์ํ๊ธฐ
3. Prisma Client ์ฌ์ฉํด๋ณด๊ธฐ
4. `nexus-prisma`๋ฅผ ์ฌ์ฉํด, Prisma ์ฐ๊ฒฐํ๊ธฐ
5. [React.js์์ GraphQL API ์ฌ์ฉํ๊ธฐ](/documents/5-react-graphql/README.md)
6. [์ญ์ ํ๊ธฐ](/documents/6-delete/README.md)
1. API ๋ฐฐํฌ ์ญ์ ํ๊ธฐ
2. CloudFormation Stack ์ญ์ ํ๊ธฐ
3. IAM ์ฌ์ฉ์ ์ญ์ ํ๊ธฐ## ํ ์ผ
Feature Request๋ฅผ ์ํ์๋ฉด, ์ ์ด์๋ฅผ ์์ฑํด์ฃผ์ธ์. ๋ํ, Pull Request๋ ์ธ์ ๋ ํ์์ ๋๋ค.๐- [x] macOS
- [x] Windows
- [x] CMD
- [x] Powershell
- [ ] WSL Bash---
### Cheatsheets
- [์์ฑ๋ ์๋ฒ ํ๋ก์ ํธ](/cheatsheet/server)
- [์์ฑ๋ ํด๋ผ์ด์ธํธ ํ๋ก์ ํธ](/cheatsheet/client)