Skip to content

Commit 525c569

Browse files
committed
cleanup
1 parent 833a727 commit 525c569

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

packages/graphql-language-service-server/src/MessageProcessor.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -975,8 +975,8 @@ export class MessageProcessor {
975975
const schemaText = await readFile(uri, 'utf8');
976976
await this._cacheSchemaText(schemaUri, schemaText, version);
977977
}
978-
} catch {
979-
// this._logger.error(String(err));
978+
} catch (err) {
979+
this._logger.error(String(err));
980980
}
981981
}
982982
private _getTmpProjectPath(
@@ -1184,7 +1184,6 @@ export class MessageProcessor {
11841184
}),
11851185
);
11861186
}
1187-
11881187
private _unwrapProjectSchema(project: GraphQLProjectConfig): string[] {
11891188
const projectSchema = project.schema;
11901189

packages/graphql-language-service-server/src/__tests__/MessageProcessor.spec.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,8 @@ describe('project with simple config and graphql files', () => {
245245
expect(serializeRange(schemaDefinitionsAgain[0].range)).toEqual(
246246
fooLaterTypePosition,
247247
);
248+
expect(project.lsp._logger.error).not.toHaveBeenCalled();
249+
248250
// TODO: the position should change when a watched file changes???
249251
});
250252
it('caches files and schema with a URL config', async () => {
@@ -369,6 +371,7 @@ describe('project with simple config and graphql files', () => {
369371
character: 31,
370372
},
371373
});
374+
expect(project.lsp._logger.error).not.toHaveBeenCalled();
372375
});
373376
it('caches multiple projects with files and schema with a URL config and a local schema', async () => {
374377
const project = new MockProject({
@@ -476,5 +479,7 @@ describe('project with simple config and graphql files', () => {
476479
position: { character: 21, line: 4 },
477480
});
478481
expect(serializeRange(schemaDefinition[0].range)).toEqual(fooTypePosition);
482+
483+
expect(project.lsp._logger.error).not.toHaveBeenCalled();
479484
});
480485
});

0 commit comments

Comments
 (0)