Skip to content

Commit

Permalink
Solve issue where the performanceLink was only activated during produ…
Browse files Browse the repository at this point in the history
…ction while it should have been during development.
  • Loading branch information
paales committed Jan 16, 2025
1 parent 9ec5b68 commit 16a3b73
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .changeset/red-lies-drive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@graphcommerce/magento-graphcms': patch
'@graphcommerce/magento-open-source': patch
'@graphcommerce/misc': patch
---

Solve issue where the performanceLink was only activated during production while it should have been during development.
2 changes: 1 addition & 1 deletion examples/magento-graphcms/lib/graphql/graphqlSsrClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function client(context: GetStaticPropsContext, fetchPolicy: FetchPolicy = 'no-c

return new ApolloClient({
link: ApolloLink.from([
...(process.env.NODE_ENV === 'production' ? [measurePerformanceLink] : []),
...(process.env.NODE_ENV !== 'production' ? [measurePerformanceLink] : []),
errorLink,
...config.links,
new MeshApolloLink(getBuiltMesh()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function client(context: GetStaticPropsContext, fetchPolicy: FetchPolicy = 'no-c

return new ApolloClient({
link: ApolloLink.from([
...(process.env.NODE_ENV === 'production' ? [measurePerformanceLink] : []),
...(process.env.NODE_ENV !== 'production' ? [measurePerformanceLink] : []),
errorLink,
...config.links,
new MeshApolloLink(getBuiltMesh()),
Expand Down

0 comments on commit 16a3b73

Please sign in to comment.