debian-mirror-gitlab/spec/contracts/consumer/helpers/graphql_query_extractor.js
2022-08-13 15:12:31 +05:30

9 lines
253 B
JavaScript

import { readFile } from 'fs/promises';
import path from 'path';
export async function extractGraphQLQuery(fileLocation) {
const file = path.resolve(__dirname, '..', '..', '..', '..', fileLocation);
return readFile(file, { encoding: 'UTF-8' });
}