From 64eae74616c955fc985a7e03b00823145b61d801 Mon Sep 17 00:00:00 2001 From: Jiabo Hou Date: Fri, 13 May 2022 15:30:16 -0400 Subject: [PATCH] fix: support jest 28 --- index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 9e35b9a..40447e8 100644 --- a/index.js +++ b/index.js @@ -2,8 +2,10 @@ const loader = require('graphql-tag/loader'); module.exports = { process(src) { - // call directly the webpack loader with a mocked context + // call directly the webpack loader with a mocked context // as graphql-tag/loader leverages `this.cacheable()` - return loader.call({ cacheable() {} }, src); + return { + code: loader.call({ cacheable() {} }, src), + }; }, };