Econify/graphql-rest-router

InMemoryCache not exported

tw00 opened this issue · 2 comments

tw00 commented

It seems like InMemoryCache is not exported in index.ts.

I can see two ways how this can be resolved:

  1. Update README.md
- import GraphQLRestRouter, { InMemoryCache } from 'graphql-rest-router';
+ import InMemoryCache from 'graphql-rest-router/InMemoryCache';

or for CJS

const { default: InMemoryCache } = require('graphql-rest-router/InMemoryCache');
  1. Export InMemoryCache in index.ts:
import Router from './Router';
import Route from './Route';
import InMemoryCache from './InMemoryCache';

import * as OpenApi from './OpenApi';
import ApiBlueprint from './ApiBlueprint';

export default Router;
export { Route, OpenApi, ApiBlueprint, InMemoryCache };

Hey @tw00 this is being addressed in #41

You will be able to export it from the root export e.g.

import GraphQLRestRouter, { InMemoryCache } from 'graphql-rest-router';

#41 has been merged. Will go out in next release.