Skip to content
This repository has been archived by the owner on Feb 27, 2024. It is now read-only.

Rename useApollo to useWpApollo and move it to connector.js #422

Merged
merged 2 commits into from
May 5, 2021

Conversation

donmhico
Copy link
Contributor

@donmhico donmhico commented May 5, 2021

Closes #421

Description

This PR removes the circular dependency by moving useApollo() from lib/apolloConfig.js to lib/wordpress/connector.js as useWpApollo()

@donmhico donmhico self-assigned this May 5, 2021
@vercel
Copy link

vercel bot commented May 5, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/webdevstudios/nextjs-wordpress-starter/AC5RPMbwSXPtrurDs9Gsj5t7x384
✅ Preview: https://nextjs-wordpre-git-bugfix-421-eliminate-circular-depende-428f3e.vercel.app

*/
export function useWpApollo(pageProps) {
const state = pageProps[APOLLO_STATE_PROP_NAME]
// Use WP Apollo instance by default.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest removing this comment line as the renaming makes it clear this is the WP Apollo instance.

@gregrickaby gregrickaby merged commit 54896cc into main May 5, 2021
@gregrickaby gregrickaby deleted the bugfix/421-eliminate-circular-dependency branch May 5, 2021 17:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Eliminate circular dependency
3 participants