MCPcopy Create free account
hub / github.com/firebase/firebase-tools / readGQLFiles

Function readGQLFiles

src/dataconnect/load.ts:220–226  ·  view source on GitHub ↗
(sourceDir: string)

Source from the content-addressed store, hash-verified

218}
219
220export async function readGQLFiles(sourceDir: string): Promise<File[]> {
221 if (!fs.existsSync(sourceDir)) {
222 return [];
223 }
224 const files = await glob("**/*.{gql,graphql}", { cwd: sourceDir, absolute: true, nodir: true });
225 return files.map((f) => toFile(sourceDir, f));
226}
227
228function toFile(sourceDir: string, fullPath: string): File {
229 const relPath = path.relative(sourceDir, fullPath);

Callers 2

readQueryFromDirFunction · 0.90
loadFunction · 0.85

Calls 1

toFileFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…