MCPcopy Create free account
hub / github.com/prettier/prettier / parse

Function parse

src/language-graphql/parser-graphql.js:40–51  ·  view source on GitHub ↗
(text /* , options */)

Source from the content-addressed store, hash-verified

38}
39
40function parse(text /* , options */) {
41 let ast;
42 try {
43 ast = parseGraphql(text, parseOptions);
44 } catch (error) {
45 throw createParseError(error);
46 }
47
48 // @ts-expect-error -- expected
49 ast.comments = parseComments(ast);
50 return ast;
51}
52
53export const graphql = {
54 parse,

Callers

nothing calls this directly

Calls 2

parseCommentsFunction · 0.85
createParseErrorFunction · 0.70

Tested by

no test coverage detected