Skip to content

Commit

Permalink
test changing internal to outside strapi url
Browse files Browse the repository at this point in the history
  • Loading branch information
Magnus Alexander Strømseng committed Apr 10, 2024
1 parent 18d0da3 commit c89c09a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/lib/ApolloClient.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { ApolloClient, HttpLink, InMemoryCache } from "@apollo/client";
import { registerApolloClient } from "@apollo/experimental-nextjs-app-support/rsc";

const INTERNAL_STRAPI_URL = process.env.INTERNAL_STRAPI_URL;
const OUTSIDE_STRAPI_URL = process.env.OUTSIDE_STRAPI_URL;

export const { getClient } = registerApolloClient(() => {
return new ApolloClient({
cache: new InMemoryCache(),
link: new HttpLink({
// this needs to be an absolute url, as relative urls cannot be used in SSR
uri: INTERNAL_STRAPI_URL + "/graphql",
uri: OUTSIDE_STRAPI_URL + "/graphql",
// you can disable result caching here if you want to
// (this does not work if you are rendering your page with `export const dynamic = "force-static"`)
fetchOptions: { cache: "no-store" },
Expand Down

0 comments on commit c89c09a

Please sign in to comment.