Skip to content

Commit

Permalink
fixing errors in testing query url
Browse files Browse the repository at this point in the history
  • Loading branch information
meenalnimje committed Jan 7, 2024
1 parent 8782dcb commit 90d53f8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
8 changes: 6 additions & 2 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
/** @type {import('next').NextConfig} */
require('dotenv').config();
const result = require('dotenv').config();

if (result.error) {
console.log("error form env",result.error);
console.error(result.error);
}

const nextConfig = {}

Expand Down
3 changes: 2 additions & 1 deletion src/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ import { ApolloClient, HttpLink, InMemoryCache } from '@apollo/client'

import fetch from 'cross-fetch'

const uri = `${process.env.WEB_URI}/api/graphql`
const client = new ApolloClient({
link: new HttpLink({ uri: 'http://localhost:3000/api/graphql', fetch }),
link: new HttpLink({ uri: uri, fetch }),
cache: new InMemoryCache(),
})

Expand Down

0 comments on commit 90d53f8

Please sign in to comment.