This package provides a collection of utility functions for building GraphQL servers and clients in Node.js. It covers common tasks like building schemas, resolvers, subscriptions, and integrating with MongoDB via Mongoose. The current stable version is 0.1.2-beta.1102, currently in beta release with regular updates on npm. Key differentiators include its support for GraphQL v16, Mongoose v8, and a focus on simplifying subscription handling with graphql-yoga. It also includes deep equality checks via fast-deep-equal. Released as an ESM-only package with TypeScript types.
npm install graphql-fnsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Quickly build a GraphQL schema and resolver using graphql-fns named imports.
Pin to exact version and test upgrades.
Replace 'makeSchema' with 'buildSchema' in imports.
Check documentation for built-in gql.
Ensure mongoose is installed and connected before using model helpers.
npm install graphql@16
Add "type": "module" to package.json or use .mjs extension.
Use import { buildSchema } from 'graphql-fns'