'How can structure apollo-server?
I would like to handle all entity-related things in the entity file. What do I mean by that?
Let's say I have two entities called User and Post
I would like to do all kinds of stuff like type, query and resolver for User inside the user.ts file.
Similarly, Post related things should be in post.ts.
I have a problem with typeDefs and resolver in the main file, in this case index.ts
Is there any example to handle that?
My intention is
src
├── schema
│ ├── user
│ │ │ index.js(it has its own resolver, types,queries, and mutations)
│ ├── order
│ │ └── index.js((it has its own resolver, types,queries, and mutations))
│ └── index.js
└── app.js
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
