Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: find apollo client instance on embedded iframes #828

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

boehlkers
Copy link

@boehlkers boehlkers commented Mar 9, 2022

Per #380.

This PR adds discovery support for apollo client instances in same-origin iframes. It does so by looking through any embedded iframes and looking for window.APOLLO_CLIENT instances therein.

I also added an iframe.html file to the client repo to test and validate the behavior; committing it may be overkill since it's not core functionality but willing to get feedback on that. Can verify by starting the local app with npm run start:dev and navigating to localhost:3000/iframe.html, which will load the demo app in an iframe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant