@klevn/dgraph
Advanced tools
Comparing version
@@ -85,3 +85,7 @@ #!/usr/bin/env node | ||
.then(() => { | ||
setTimeout(resolve, 5000); | ||
setInterval(() => { | ||
(0, node_fetch_1.default)(paths.graphql).then(() => { | ||
resolve(true); | ||
}).catch(() => { }); | ||
}, 2000); | ||
}) | ||
@@ -91,3 +95,3 @@ .catch(reject); | ||
} | ||
function watchGqlSchema() { | ||
async function watchGqlSchema() { | ||
async function updateGqlSchema() { | ||
@@ -138,2 +142,4 @@ cli_1.default.pause(); | ||
(0, logger_1.logBreak)(); | ||
await updateGqlSchema(); | ||
(0, logger_1.logBreak)(); | ||
} | ||
@@ -150,3 +156,3 @@ async function runCli() { | ||
(0, logger_1.info)("Watch", lang_1.default.watch.start()); | ||
watchGqlSchema(); | ||
await watchGqlSchema(); | ||
cli_1.default.resume(); | ||
@@ -153,0 +159,0 @@ } |
@@ -11,3 +11,3 @@ { | ||
"name": "@klevn/dgraph", | ||
"version": "3.0.2", | ||
"version": "3.0.3", | ||
"main": "./dist/dedicated.js", | ||
@@ -14,0 +14,0 @@ "scripts": { |
# Dgraph-dedicated | ||
Run: ```npx dgraph-dedicated <cli/production>``` | ||
Run: ```npx @klevn/draph <cli/production>``` | ||
@@ -5,0 +5,0 @@ Edit shema.graphql to get real time updates. |
@@ -103,3 +103,7 @@ #!/usr/bin/env node | ||
.then(() => { | ||
setTimeout(resolve, 5000) | ||
setInterval(() => { | ||
nodeFetch(paths.graphql).then(() => { | ||
resolve(true) | ||
}).catch(() => {}) | ||
}, 2000) | ||
}) | ||
@@ -111,3 +115,3 @@ .catch(reject) | ||
function watchGqlSchema() { | ||
async function watchGqlSchema() { | ||
async function updateGqlSchema() { | ||
@@ -167,2 +171,4 @@ cliSingelton.pause() | ||
logBreak() | ||
await updateGqlSchema() | ||
logBreak() | ||
} | ||
@@ -186,3 +192,3 @@ | ||
info("Watch", lang.watch.start()) | ||
watchGqlSchema() | ||
await watchGqlSchema() | ||
@@ -189,0 +195,0 @@ cliSingelton.resume() |
37841
1.15%929
1.31%