MCPcopy
hub / github.com/graphql/graphiql / doValidation

Method doValidation

packages/monaco-graphql/src/GraphQLWorker.ts:34–51  ·  view source on GitHub ↗
(uri: string)

Source from the content-addressed store, hash-verified

32 }
33
34 public async doValidation(uri: string) {
35 try {
36 const documentModel = this._getTextModel(uri);
37 const document = documentModel?.getValue();
38 if (!document) {
39 return [];
40 }
41 const graphqlDiagnostics = this._languageService.getDiagnostics(
42 uri,
43 document,
44 );
45 return graphqlDiagnostics.map(toMarkerData);
46 } catch (err) {
47 // eslint-disable-next-line no-console
48 console.error(err);
49 return [];
50 }
51 }
52
53 public async doComplete(
54 uri: string,

Callers 1

_doValidateMethod · 0.80

Calls 3

_getTextModelMethod · 0.95
getDiagnosticsMethod · 0.80
errorMethod · 0.45

Tested by

no test coverage detected