From 9b34e75307d441ff3e37fbf056d6f86a1dfe73b9 Mon Sep 17 00:00:00 2001 From: Mikhail Novikov Date: Mon, 6 Apr 2020 13:25:16 +0300 Subject: [PATCH] Use v8 serialize in telemetry --- packages/gatsby/src/query/graphql-runner.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/gatsby/src/query/graphql-runner.ts b/packages/gatsby/src/query/graphql-runner.ts index ab45a4855380a..75fb944a3e1af 100644 --- a/packages/gatsby/src/query/graphql-runner.ts +++ b/packages/gatsby/src/query/graphql-runner.ts @@ -1,4 +1,5 @@ import crypto from "crypto" +import v8 from "v8" import { parse, validate, @@ -169,7 +170,7 @@ export default class GraphQLRunner { crypto .createHash(`sha1`) .update(statsQuery) - .update(JSON.stringify(context)) + .update(v8.serialize(context)) .digest(`hex`) )