Version: Legacy
Your First Module
You have understood the basics behind separating the schema. Let's create your first module.
Start by creating a modules/my-first-module
directory under your project's root. Then, create a file index.ts
.
Here is a quick example:
modules/my-first-module/index.ts
That's it. You now have a ready-to-use GraphQLModule
. Our next step is to expose it using ApolloServer
.