GraphQL Modules lets you implement your GraphQL resolvers in a standard way, just like other GraphQL applications.
To get started with implementing basic resolvers, create a simple object with a 'type name → fields' mapping.
Let's take for an example the following schema for
Let's implement the resolvers object. For now we will use just static mocked objects.
Now, update your
GraphQLModule declaration to load the resolvers:
We can import from
schema.graphqlbecause we are doing some bundling tricks. If you need help with it, refer to the Development Environment section.
Providers are a first-class citizen in GraphQL Modules - they can easily interact with other modules, access modules' configurations, manage their lifecycles, and more.
To know how to use
Providers, in the next step, we will take the previous example and change it to use