debian-mirror-gitlab/spec/contracts/consumer/resources/graphql/pipelines.js

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

26 lines
604 B
JavaScript
Raw Normal View History

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