Skip to content

Commit 52d94b2

Browse files
committed
move the /graphql suffix to axios configuration
1 parent 34c4e70 commit 52d94b2

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/App.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React, { Component } from 'react';
22
import axios from 'axios';
33

44
const axiosGitHubGraphQL = axios.create({
5-
baseURL: 'https://api.github.com',
5+
baseURL: 'https://api.github.com/graphql',
66
headers: {
77
Authorization: `bearer ${
88
process.env.REACT_APP_GITHUB_PERSONAL_ACCESS_TOKEN
@@ -57,15 +57,15 @@ const getAddReactionToIssueMutation = issueId => `
5757
`;
5858

5959
const addReactionToIssue = issueId => {
60-
return axiosGitHubGraphQL.post('/graphql', {
60+
return axiosGitHubGraphQL.post('', {
6161
query: getAddReactionToIssueMutation(issueId),
6262
});
6363
};
6464

6565
const getIssuesOfRepository = path => {
6666
const [organization, repository] = path.split('/');
6767

68-
return axiosGitHubGraphQL.post('/graphql', {
68+
return axiosGitHubGraphQL.post('', {
6969
query: getIssuesOfRepositoryQuery(organization, repository),
7070
});
7171
};

0 commit comments

Comments
 (0)