(sourceDir: string)
| 218 | } |
| 219 | |
| 220 | export 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 | |
| 228 | function toFile(sourceDir: string, fullPath: string): File { |
| 229 | const relPath = path.relative(sourceDir, fullPath); |
no test coverage detected
searching dependent graphs…