fix(gql-ts): fixes an issue where process.hrtime was not defined in worker (#262)

fixes #248
This commit is contained in:
Ritesh Kumar authored and GitHub committed 2020-12-12 15:24:51 +05:30
1 parent d37b677fee
commit 8027755210
1 file changed
+13
+13
View File
@@ -0,0 +1,13 @@
diff --git a/node_modules/relay-compiler/lib/core/GraphQLCompilerProfiler.js b/node_modules/relay-compiler/lib/core/GraphQLCompilerProfiler.js
index 77a0cad..d842094 100644
--- a/node_modules/relay-compiler/lib/core/GraphQLCompilerProfiler.js
+++ b/node_modules/relay-compiler/lib/core/GraphQLCompilerProfiler.js
@@ -189,6 +189,8 @@ function instrumentWait(fn, name) {
return instrumented;
}
+process.hrtime = () => null
+
var T_ZERO = process.hrtime(); // Return a Uint32 of microtime duration since program start.
function microtime() {