@parameter1/base-cms-graphql-fragment-types

4.74.0 • Public • Published

BaseCMS GraphQL Fragment Types

Provides fragment types for the BaseCMS GraphQL API. For use with Apollo GraphQL clients.

Usage

import introspectionQueryResultData from '@parameter1/base-cms-graphql-fragment-types';
import { ApolloClient } from 'apollo-client';
import { InMemoryCache, IntrospectionFragmentMatcher } from 'apollo-cache-inmemory';

const fragmentMatcher = new IntrospectionFragmentMatcher({ introspectionQueryResultData });
const cache = new InMemoryCache({ fragmentMatcher });

export default new ApolloClient({ cache });

Developing / Building

To build a new version of types.json, run the following command inside the monorepo.

GRAPHQL_URL=[the graphql url to build from] node packages/graphql-fragment-types/build.js

Readme

Keywords

none

Package Sidebar

Install

npm i @parameter1/base-cms-graphql-fragment-types

Weekly Downloads

8

Version

4.74.0

License

MIT

Unpacked Size

10.2 kB

Total Files

8

Last publish

Collaborators

  • b77mills
  • brandonbk
  • zarathustra323
  • solocommand