Modules

Enterprise-grade tooling for your GraphQL server

GraphQL Modules is a toolset of libraries and guidelines dedicated to creating reusable, maintainable, testable and extendable modules out of your GraphQL server. Part of the Hive ecosystem by The Guild.

Built for growing teams

A module is a schema slice

Each module owns its type definitions, resolvers and providers. The application composes them into one executable schema.

Get started
import { createModule, gql } from 'graphql-modules';

export const usersModule = createModule({
  id: 'users',
  typeDefs: gql`
    type User {
      id: ID!
      name: String!
    }
    type Query {
      user(id: ID!): User
    }
  `,
  resolvers: {
    Query: {
      user: (_root, { id }, { injector }) => injector.get(UsersService).byId(id),
    },
  },
});

Learn more

Discover the complete ecosystem of tools and libraries

Complete GraphQL Federation Stack

Our libraries to support all your GraphQL needs

Explore the Ecosystem