Registry / testing / graphql-web-lite

graphql-web-lite

JSON →
library16.6.0-4jsnpmunverified

A slimmed-down fork of graphql-js (v16.6.0) optimized for client-side use. Retains the core GraphQL language and operation execution, but removes server-only features (schema definition, validation, introspection) to reduce bundle size (~50% smaller). Published as 'graphql-web-lite' on npm. Suitable for lightweight GraphQL clients or fragments of graphql-js where full parser/executor is needed without schema building. Active maintenance tracking graphql-js releases.

npm install graphql-web-lite
INSTALL
IMPORT
SIG · GRAPHQL-WEB-LITE
G
graphql-web-lite
testingjavascriptv16.6.0-4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

parse
✓ import { parse } from 'graphql-web-lite'
✗ import { parse } from 'graphql-web-lite/parse'
Import from the main package; subpath imports are not supported.
execute
✓ import { execute } from 'graphql-web-lite'
✗ import { executeSync } from 'graphql-web-lite'
Only execute (async) is exported; executeSync is not available.
print
✓ import { print } from 'graphql-web-lite'
✗ const { print } = require('graphql-web-lite')
Package is ESM-only; require() will fail. Use dynamic import or import syntax.
GraphQLSchema
✓ import { GraphQLSchema } from 'graphql'
✗ import { GraphQLSchema } from 'graphql-web-lite'
GraphQLSchema is intentionally excluded. Use full graphql-js if schema building is needed.

Shows basic parse and execute of a GraphQL query with a resolver.

import { parse, execute } from 'graphql-web-lite' const source = `{ hello }` const doc = parse(source) const rootValue = { hello() { return 'world' } } const schema = {} const result = await execute({ schema, document: doc, rootValue, }) console.log(result.data) // { hello: 'world' }
Debug
Known issues
breakingNo schema validation or introspection support.
fix
Use graphql-js if schema building or validation is required.
affects: >=16.0.0
gotchaPackage is ESM-only; CommonJS require() will throw.
fix
Use import syntax or dynamic import() instead of require().
affects: >=16.0.0
gotchaVersion numbers differ from graphql-js; 16.6.0-4 is a fork, not official graphql-js.
fix
Check compatibility with graphql-js versions carefully; treat as independent.
affects: >=16.0.0
deprecatedexecuteSync is not exported; only async execute is available.
fix
Use execute (async/await) instead.
affects: >=16.0.0
Errors
Common errors & fixes
Cannot find module 'graphql-web-lite' or its corresponding type declarations.
Package not installed or TypeScript cannot resolve types.
fix
Install the package: npm install graphql-web-lite. Ensure tsconfig.json includes node_modules in typeRoots.
require() of ES Module /node_modules/graphql-web-lite/index.js not supported.
Package is ESM-only, not compatible with CommonJS require.
fix
Convert to ES modules (use import) or use dynamic import().
Upgrade
Version history
16.6.0-4latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
13 hits · last 30 days
node
12
Resources
graphql-web-lite — npm install graphql-web-lite · libregistry