diff options
Diffstat (limited to 'spec/contracts/consumer/helpers/graphql_query_extractor.js')
-rw-r--r-- | spec/contracts/consumer/helpers/graphql_query_extractor.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/contracts/consumer/helpers/graphql_query_extractor.js b/spec/contracts/consumer/helpers/graphql_query_extractor.js new file mode 100644 index 00000000000..884fa2cf528 --- /dev/null +++ b/spec/contracts/consumer/helpers/graphql_query_extractor.js @@ -0,0 +1,8 @@ +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' }); +} |