graphql-combine v1.0.1 is a utility for modularizing GraphQL schemas and resolvers by reading files from the filesystem. It uses glob patterns to collect schema.graphql and resolver.js files, merging them into a single typeDefs and resolvers object for Apollo Server or similar. Unlike graphql-tools' mergeFiles or manual concatenation, it provides a simple file-based convention. The package has had no updates since 2019 and relies on glob and merge-graphql-schemas. It is suitable for small to medium projects but lacks active maintenance.
npm install graphql-combineNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Combine schema.graphql and resolver.js files from multiple directories into one Apollo Server instance.
Use dynamic import() or switch to ESM project (type: 'module' in package.json).
Ensure each resolver file has export default { ... }.Ensure resolver keys (e.g., Query, Mutation) are unique across files or wrap in separate namespaces.
Consider migrating to graphql-tools' mergeResolvers and mergeTypeDefs from @graphql-tools/merge.
Change import { combine } from 'graphql-combine' to import combine from 'graphql-combine'.Run npm install graphql-combine and ensure it is in node_modules.
Use dynamic import() or set project to type: 'module' in package.json.