diff options
Diffstat (limited to 'spec/contracts/consumer/resources/graphql/pipelines.js')
-rw-r--r-- | spec/contracts/consumer/resources/graphql/pipelines.js | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/spec/contracts/consumer/resources/graphql/pipelines.js b/spec/contracts/consumer/resources/graphql/pipelines.js new file mode 100644 index 00000000000..4f7ce58891c --- /dev/null +++ b/spec/contracts/consumer/resources/graphql/pipelines.js @@ -0,0 +1,25 @@ +import axios from 'axios'; + +import { extractGraphQLQuery } from '../../helpers/graphql_query_extractor'; + +export async function getPipelineHeaderDataRequest(endpoint) { + const { url } = endpoint; + const query = await extractGraphQLQuery( + 'app/assets/javascripts/pipelines/graphql/queries/get_pipeline_header_data.query.graphql', + ); + const graphqlQuery = { + query, + variables: { + fullPath: 'gitlab-org/gitlab-qa', + iid: 1, + }, + }; + + return axios({ + baseURL: url, + url: '/api/graphql', + method: 'POST', + headers: { Accept: '*/*' }, + data: graphqlQuery, + }); +} |