A set of utilities for faster GraphQL development
GraphQL Tools is a collection of npm packages that provides a structured approach to building GraphQL schemas and resolvers in JavaScript, following the GraphQL-first development workflow. Part of the Hive ecosystem by The Guild.
- Fully open source
- No vendor lock-in
- Works with any GraphQL server
Everything GraphQL
- GraphQL-first philosophyUse the GraphQL schema definition language to generate a schema with full support for resolvers, interfaces, unions, and custom scalars.
- Mock your GraphQL APIMock your API with fine-grained per-type mocking for fast prototyping without any data sources.
- Load schemas and documentsLoad type definitions and operations from files, URLs, code, and Git with a single loader API.
- Merge and composeMerge type definitions and resolvers from many modules, and compose resolvers with middleware-style functions.
From SDL to an executable schema
Write the schema in the GraphQL schema language, add a resolver map, and get a GraphQLSchema any server can execute.
Build a schemaimport { makeExecutableSchema } from '@graphql-tools/schema';
const typeDefs = /* GraphQL */ `
type Query {
hello(name: String): String!
}
`;
const resolvers = {
Query: {
hello: (_root, { name }) => `Hello, ${name ?? 'world'}!`,
},
};
export const schema = makeExecutableSchema({ typeDefs, resolvers });Learn more
API reference
Every function, class, and type exported by each @graphql-tools package, generated from the sources.
API reference →Schema stitching
Combine several GraphQL services into one gateway schema with Schema Stitching.
Stitching docs →Changelogs
Every release of every package and the changes it brought.
Changelogs →
Discover the complete ecosystem of tools and libraries
Complete GraphQL Federation Stack
Our libraries to support all your GraphQL needs
Explore the Ecosystem