debian-mirror-gitlab/spec/contracts/consumer/helpers/graphql_query_extractor.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

9 lines
253 B
JavaScript
Raw Normal View History

2022-08-13 15:12:31 +05:30
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' });
}