mercurius
Advanced tools
Comparing version 8.9.0 to 8.9.1
@@ -66,2 +66,4 @@ # Hooks | ||
Note that if you modify the `document` object, the jit compilation will be disabled for the request. | ||
```js | ||
@@ -147,3 +149,3 @@ fastify.graphql.addHook('preExecution', async (schema, document, context) => { | ||
"data": { | ||
foo: "bar" | ||
"foo": "bar" | ||
}, | ||
@@ -150,0 +152,0 @@ "errors": [ |
@@ -538,7 +538,7 @@ 'use strict' | ||
// minJit is 0 by default | ||
if (shouldCompileJit) { | ||
cached.jit = compileQuery(fastifyGraphQl.schema, modifiedDocument || document, operationName) | ||
if (shouldCompileJit && !modifiedDocument) { | ||
cached.jit = compileQuery(fastifyGraphQl.schema, document, operationName) | ||
} | ||
if (cached && cached.jit !== null) { | ||
if (cached && cached.jit !== null && !modifiedDocument) { | ||
const execution = await cached.jit.query(root, context, variables || {}) | ||
@@ -545,0 +545,0 @@ |
{ | ||
"name": "mercurius", | ||
"version": "8.9.0", | ||
"version": "8.9.1", | ||
"description": "Fastify GraphQL adapter with gateway and subscription support", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
811919
128
28639