A JavaScript library (v1.2.0, last updated 2016) for building GraphQL queries programmatically using plain JavaScript objects. Allows dynamic query construction with support for aliases, arguments, and enums via the Enum helper. Lightweight and dependency-free, but not actively maintained. Differentiated from template-based builders by its object-oriented approach, but lacks support for fragments, directives, or variables typical of modern alternatives like graphql-request or graphql-tag.
npm install graphqlifyVerified import paths — ran on the pinned version, not inferred.
Demonstrates building a GraphQL query with alias, argument, and enum using graphqlify.
Migrate to graphql-request for a more complete GraphQL client.
Use const graphqlify = require('graphqlify').default;Use the 'alias' key for aliases, not 'field'.
Always add fields: {} for simple fields without subfields.npm install graphqlify@1.2.0
const graphqlify = require('graphqlify').default;Ensure each field has a proper fields object or alias.
No dependency data recorded yet.