Registry / database / cashay

cashay

JSON →
library0.24.0jsnpmunverified

Cashay is a GraphQL client library that integrates with Redux, positioning itself as a simpler alternative to Relay and Apollo. It uses your GraphQL client schema, supports local transforms (sort, filter), and generates mutations automatically. The current stable version is 0.24.0, with a release cadence that appears infrequent (last release likely older). Key differentiators include deep Redux integration, denormalized caching, and support for subscriptions and local state, though it lacks query batching and built-in SSR. It requires a webpack loader for schema integration and is suitable for projects already using Redux.

npm install cashay
INSTALL
IMPORT
SIG · CASHAY
C
cashay
databasejavascriptv0.24.0
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.

cashayReducer
import { cashayReducer } from 'cashay'
const cashayReducer = require('cashay').cashayReducer
ESM import or CJS destructuring work
transformSchema
import { transformSchema } from 'cashay'
const transformSchema = require('cashay').transformSchema
Used for schema transformation server-side
cashay
import cashay from 'cashay'
const { cashay } = require('cashay')
Default export for the singleton instance

Create a Redux store with cashayReducer, initialize the cashay singleton with a schema, and run a simple query.

import { createStore, combineReducers } from 'redux'; import { cashayReducer } from 'cashay'; import cashay from 'cashay'; const rootReducer = combineReducers({ cashay: cashayReducer }); const store = createStore(rootReducer); cashay.create({ store, schema: someSchema }); // Example query cashay.query('users', `{ id name }`).then(result => { console.log(result.data); });
Debug
Known issues
breakingCashay requires a specific Redux store shape; incorrect reducer placement will break queries
fix
Ensure the reducer is combined under the key 'cashay' as shown in docs
affects: >=0.0.0
gotchaThe webpack loader requires a module that exports a function returning a Promise for a schema; not doing so will cause build errors
fix
Export a function from the schema module as described
affects: >=0.0.0
deprecatedCashay may be unmaintained; last release was several years ago
fix
Consider using Apollo or Relay for active support
affects: >=0.0.0
gotchaCashay does not support the full GraphQL spec (e.g., fragments on interfaces)
fix
Stick to simple query and mutation patterns
affects: >=0.0.0
Errors
Common errors & fixes
Cashay: No schema provided
Missing schema when creating cashay singleton
fix
Call cashay.create({ store, schema: yourSchema })
Cashay: Reducer not found at state.cashay
Cashay reducer not added or under wrong key
fix
Combine reducers with cashay: cashayReducer
Cannot find module 'cashay-loader'
Webpack loader configuration issue
fix
Use require('cashay!./path/to/schema') syntax and ensure webpack resolves cashay-loader
Upgrade
Version history
0.24.0latest on npm
Audit
Dependencies
reduxrequiredCashay stores state in a Redux store
Agent activity
17 hits · last 30 days
node
14
OpenAI (training)
1
Resources
packagecashay
cashay — npm install cashay · libregistry