Socket
Socket
Sign inDemoInstall

@exogee/graphweaver-apollo-client

Package Overview
Dependencies
0
Maintainers
3
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @exogee/graphweaver-apollo-client

Useful helpers for working with Apollo Client and Graphweaver


Version published
Weekly downloads
3
decreased by-72.73%
Maintainers
3
Created
Weekly downloads
 

Readme

Source

@exogee/graphweaver-apollo-client

Useful helpers for working with Apollo Client and Graphweaver.

The package currently only exposes a single function (addTypePolicies) that will generate a working Apollo Client Type Policy for the Graphweaver entities.

To use it:

import { generateTypePolicies } from '@exogee/graphweaver-apollo-client';
import { InMemoryCache } from '@apollo/client';

const cache = new InMemoryCache();

const entityNames = ['Users', 'Tasks'];
const typePolicies = generateTypePolicies(entityNames);
cache.policies.addTypePolicies(typePolicies);

This policy does two things when looping through all the entities in the schema it:

  1. Creates a KeyArgs Function that will cache the entities based on the filter and pagination arguments.
  2. It creates a merge function for collections so that paginated results are returned into the same array when paginating.

Documentation

Comprehensive documentation and usage examples can be found on our Docs Site. It covers installation instructions, detailed API documentation, and guides to help you get started with Graphweaver.

Graphweaver CLI graphweaver

The Graphweaver Command Line Interface (CLI) tool enables you to set up and manage Graphweaver using commands in your command-line shell. Check the graphweaver npm package here.

Keywords

FAQs

Last updated on 22 Mar 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc