Skip to content

Commit 950d5b7

Browse files
Update README.md
1 parent a15efb8 commit 950d5b7

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,7 @@ GraphQL Rest Router ships with two cache interfaces stock and supports any numbe
281281
InMemoryCache stores your cached route data on your server in memory. This can be used in development or with low TTLs in order to prevent a [thundering herd](https://en.wikipedia.org/wiki/Thundering_herd_problem) however it is strongly discouraged to use this in production. In Memory caches have the ability to deplete your system's resources and take down your instance of GraphQLRestRouter.
282282

283283
```js
284-
import GraphQLRestRouter from 'graphql-rest-router';
285-
import InMemoryCache from 'graphql-rest-router/InMemoryCache';
284+
import GraphQLRestRouter, { InMemoryCache } from 'graphql-rest-router';
286285

287286
const api = new GraphQLRestRouter('http://localhost:1227', schema, {
288287
cacheEngine: new InMemoryCache(),
@@ -309,7 +308,7 @@ As GraphQL Rest Router exposes your API with new routes that aren't covered by G
309308

310309
### Open API (Preferred)
311310
```js
312-
const OpenApi = require('graphql-rest-router/OpenApi');
311+
const { OpenApi } = require('graphql-rest-router');
313312

314313
const documentation = new OpenApi.V3({
315314
title: 'My REST API', // REQUIRED!
@@ -326,7 +325,7 @@ api.mount(documentation).at('/docs/openapi');
326325

327326
### Swagger
328327
```js
329-
const OpenApi = require('graphql-rest-router/OpenApi');
328+
const { OpenApi } = require('graphql-rest-router');
330329

331330
const swaggerDocumentation = new OpenApi.V2({
332331
title: 'My REST API', // REQUIRED!

0 commit comments

Comments
 (0)