diff --git a/index.js b/index.js index 2cdf3c5a..4923c8d6 100644 --- a/index.js +++ b/index.js @@ -1,7 +1,7 @@ 'use strict' const fp = require('fastify-plugin') -let LRU = require("tiny-lru"); +let LRU = require('tiny-lru') const routes = require('./lib/routes') const { compileQuery } = require('graphql-jit') const { Factory } = require('single-user-cache') @@ -45,6 +45,7 @@ const { kLoaders, kFactory, kSubscriptionFactory, kHooks } = require('./lib/symb const { preParsingHandler, preValidationHandler, preExecutionHandler, onResolutionHandler, onGatewayReplaceSchemaHandler } = require('./lib/handlers') // Required for module bundlers +// istanbul ignore next LRU = typeof LRU === 'function' ? LRU : LRU.default function buildCache (opts) { diff --git a/lib/persistedQueryDefaults.js b/lib/persistedQueryDefaults.js index ac9fe424..7f329b67 100644 --- a/lib/persistedQueryDefaults.js +++ b/lib/persistedQueryDefaults.js @@ -1,10 +1,11 @@ 'use strict' const crypto = require('crypto') -let LRU = require("tiny-lru") +let LRU = require('tiny-lru') // Required for module bundlers -LRU = typeof LRU === "function" ? LRU : LRU.default +// istanbul ignore next +LRU = typeof LRU === 'function' ? LRU : LRU.default const persistedQueryDefaults = { prepared: (persistedQueries) => ({