Skip to content

Commit

Permalink
Configure graphql endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
cesarcnicasource committed Jun 9, 2023
1 parent b788383 commit e854692
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/withData.tsx
Expand Up @@ -4,7 +4,7 @@ import { getDataFromTree } from '@apollo/client/react/ssr';
// import { createUploadLink } from 'apollo-upload-client';
import withApollo from 'next-with-apollo';
import { setContext } from '@apollo/client/link/context';
import { endpoint, prodEndpoint } from '../config';
// import { endpoint, prodEndpoint } from '../config';
import { LOCALSTORAGE_TOKEN } from './constants';
import { isBrowser } from './helpers';
// import { PAGINATION_QUERY } from '@components/Pagination';
Expand Down Expand Up @@ -41,8 +41,8 @@ export default withApollo(({ ctx, headers, initialState }) => {
const httpLink = createHttpLink({
uri:
process.env.NODE_ENV === 'production'
? prodEndpoint
: endpoint,
? `${process.env.NEXT_PUBLIC_DOMAIN}`
: `${process.env.NEXT_PUBLIC_DOMAIN}`,
});

const authLink = setContext((_, { headers }) => {
Expand Down

0 comments on commit e854692

Please sign in to comment.