A lightweight GraphQL client built on RxJS observables, allowing GraphQL queries and mutations to be managed with reactive operators like switchMap, mergeMap, and exhaustMap. Current stable version 3.0.1 targets RxJS 7.x. Unlike Apollo Client, it focuses on simplicity and cancellability via observables, with built-in query builder support for fragments and variables. Ships TypeScript types.
npm install graphql-expressNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows a basic GraphQL query using the query function, handling the response and errors with RxJS operators.
Update rxjs to ^7.8.2 in your project.
Use the new simplified query/mutation result format directly. If you need Apollo-like structure, migrate to Apollo Client.
Add headers in the options object: { headers: { Authorization: `Bearer ${token}` } }Run: npm install graphql-express rxjs
Ensure rxjs ^7.8.2 is installed and import 'query' correctly: import { query } from 'graphql-express'Verify the REQUEST_URL, check CORS settings, and if using a browser, ensure the endpoint allows cross-origin requests.