2020-01-14 TIL

지난 번에 graphql-yoga를 이용하여 테스트 했던 것을 Apollo와 Typescript로 전환했다.

graphql-apollo-boilerplate

프로젝트 구조를 고민하면서 만들었는데 지난 번 보다는 나아졌다. 한동안은 이 구조로 진행해보자.

├── modules
│   ├── comment
│   │   ├── commentResolver.ts
│   │   ├── commentSchema.ts
│   │   └── index.ts
│   ├── post
│   │   ├── index.ts
│   │   ├── postResolver.ts
│   │   └── postSchema.ts
│   ├── querySchema.ts
│   └── user
│       ├── index.ts
│       ├── userResolver.ts
│       └── userSchema.ts
├── resolvers.ts
├── schemas.ts
├── fakeData.ts
└── index.ts

(modules 안에 들어 있는 querySchema.ts가 맘에 안든다. mutation, subscription이 추가되면 더 보기 싫을 것 같은데…)


Written by@[Suho]
뭐든지 만들어보자.