Skip to content

Commit

Permalink
Remove dotenv from Relay example. (#21814)
Browse files Browse the repository at this point in the history
Address one of the bullet points from #15225 to remove unused dependencies on `dotenv` now that it's supported by default in Next.js.
  • Loading branch information
leerob authored Feb 3, 2021
1 parent 379ad1b commit 5536526
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 25 deletions.
2 changes: 1 addition & 1 deletion examples/with-reason-relay/.env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
RELAY_ENDPOINT=https://nextjs-graphql-with-prisma-relay.vercel.app/api
NEXT_PUBLIC_RELAY_ENDPOINT=https://nextjs-graphql-with-prisma-relay.vercel.app/api
21 changes: 0 additions & 21 deletions examples/with-reason-relay/next.config.js

This file was deleted.

2 changes: 0 additions & 2 deletions examples/with-reason-relay/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
"@zeit/next-css": "1.0.1",
"bs-fetch": "0.5.2",
"bs-platform": "7.2.2",
"dotenv": "^8.2.0",
"dotenv-webpack": "^1.7.0",
"graphql": "15.0.0",
"isomorphic-unfetch": "^3.0.0",
"next": "latest",
Expand Down
2 changes: 1 addition & 1 deletion examples/with-reason-relay/src/RelayEnv.re
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ exception Graphql_error(string);
*/
let fetchQuery: ReasonRelay.Network.fetchFunctionPromise =
(operation, variables, _cacheConfig) => {
let uri: string = [%raw "process.env.RELAY_ENDPOINT"];
let uri: string = [%raw "process.env.NEXT_PUBLIC_RELAY_ENDPOINT"];
fetchWithInit(
uri,
RequestInit.make(
Expand Down

0 comments on commit 5536526

Please sign in to comment.