(m: NodeModule, filename: string)
| 11 | const VALID_EXTENSIONS = ['graphql', 'graphqls', 'gql', 'gqls']; |
| 12 | |
| 13 | export function handleModule(m: NodeModule, filename: string) { |
| 14 | const sources = loadTypedefsSync(filename, { |
| 15 | loaders: [new GraphQLFileLoader()], |
| 16 | }); |
| 17 | |
| 18 | const documents = sources.map(source => source.document).filter(isSome); |
| 19 | const mergedDoc = concatAST(documents); |
| 20 | m.exports = mergedDoc; |
| 21 | } |
| 22 | |
| 23 | export function registerGraphQLExtensions(nodeRequire: NodeRequire) { |
| 24 | for (const ext of VALID_EXTENSIONS) { |
no test coverage detected
searching dependent graphs…