GraphQL & Relay integration for MySQL and Postgres via Sequelize. Current stable version is 9.4.4, released periodically. It provides resolver helpers that automatically convert GraphQL arguments to Sequelize where clauses, supports Relay connections, and includes before/after hooks for query manipulation. Designed to work with dataloader-sequelize to avoid N+1 queries. Key differentiators: seamless integration between GraphQL and Sequelize, automatic arg-to-where conversion, and built-in Relay support.
npm install date-graphql-sequelizeNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a GraphQL schema with Sequelize models using resolver and attributeFields helpers.
Use graphql@14 or lower. For v15+, check for updated version of graphql-sequelize or alternative library.
Use before hook to manually handle custom args.
Upgrade to latest or explicitly set list option.
Add declare module 'graphql-sequelize' or use @types/graphql-sequelize from DefinitelyTyped.
Pass { handleConnection: false } in resolver options if your field is not a Relay connection.Install and configure dataloader-sequelize alongside graphql-sequelize.
Use contextToOptions option inside resolver() call instead.
npm install graphql-sequelize
Ensure only one Node interface is defined, or use globalIdField with unique type names.
Use import { resolver } from 'graphql-sequelize' or const { resolver } = require('graphql-sequelize').Check that associations are correctly defined and foreign keys exist in the database.
Ensure resolver is used for the field and list option is correctly set (or auto-detected).