feature: fix Apollo client
This commit is contained in:
@ -1 +1 @@
|
|||||||
REACT_APP_API_URL=http://localhost:3000
|
REACT_APP_API_URL=http://localhost:8080
|
||||||
@ -13,11 +13,13 @@ import { setContext } from '@apollo/client/link/context';
|
|||||||
import '@emotion/react';
|
import '@emotion/react';
|
||||||
import { ThemeType } from './layout/styles/themes';
|
import { ThemeType } from './layout/styles/themes';
|
||||||
|
|
||||||
const httpLink = createHttpLink({ uri: process.env.REACT_APP_API_URL });
|
const httpLink = createHttpLink({
|
||||||
|
uri: `${process.env.REACT_APP_API_URL}/v1/graphql`,
|
||||||
|
});
|
||||||
|
|
||||||
const authLink = setContext((_, { headers }) => {
|
const authLink = setContext((_, { headers }) => {
|
||||||
return {
|
return {
|
||||||
headers: headers,
|
headers: { ...headers, 'x-hasura-admin-secret': 'secret' },
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user