From a888be15c92e59811740a95d9fe6cee34b0f41b5 Mon Sep 17 00:00:00 2001 From: Thomas Kunwar <20840228+yathomasi@users.noreply.github.com> Date: Mon, 20 Jan 2025 22:36:39 +0545 Subject: [PATCH] feat: add apollo integration (#5341) --- gatsby-shared.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gatsby-shared.tsx b/gatsby-shared.tsx index 3558a61fd7..b7ba73b748 100644 --- a/gatsby-shared.tsx +++ b/gatsby-shared.tsx @@ -1,6 +1,7 @@ import { GatsbyBrowser, Script } from 'gatsby' const GATSBY_REO_DEV_CLIENT_ID = process.env.GATSBY_REO_DEV_CLIENT_ID +const GATSBY_APOLLO_IO_APP_ID = process.env.GATSBY_APOLLO_IO_APP_ID export const wrapPageElement: GatsbyBrowser['wrapPageElement'] = ({ element @@ -13,6 +14,11 @@ export const wrapPageElement: GatsbyBrowser['wrapPageElement'] = ({ {` !function(){var e,t,n;e="${GATSBY_REO_DEV_CLIENT_ID}",t=function(){Reo.init({clientID:"${GATSBY_REO_DEV_CLIENT_ID}"})},(n=document.createElement("script")).src="https://static.reo.dev/"+e+"/reo.js",n.async=!0,n.onload=t,document.head.appendChild(n)}();`} )} + {GATSBY_APOLLO_IO_APP_ID && ( + + )} ) }