Mirror: TypeScript LSP plugin that finds GraphQL documents in your code and provides diagnostics, auto-complete and hover-information.

chore: change to setTimeout (#255)

Changed files
+9 -3
.changeset
packages
graphqlsp
src
graphql
+5
.changeset/loud-moles-wait.md
···
+
---
+
'@0no-co/graphqlsp': patch
+
---
+
+
Change `setInterval` to `setTimeout`
+4 -3
packages/graphqlsp/src/graphql/getSchema.ts
···
logger(`Got invalid response ${JSON.stringify(result)}`);
}
});
+
+
setTimeout(() => {
+
pollSchema();
+
}, 1000 * 60);
};
pollSchema();
-
setInterval(() => {
-
pollSchema();
-
}, 1000 * 60);
} else if (typeof schema === 'string') {
const isJson = path.extname(schema) === '.json';
const resolvedPath = path.resolve(path.dirname(root), schema);