Closed enzonotario closed 4 years ago
Share variables using e.g. same Vuex instance or even global window
.
You can also add some variable to component passed to Vue.customElement
.
Feel free to ask more questions. Regards
Nice, the old window
object works fine. Thanks so much!!!
Hi! Firstly, thanks so much for your amazing work!
I have a little doubt. I'm trying to make a widget, but that widget will use Apollo (at least for now, maybe later I can make just a little api to simplify). Moreover, that widget has to connect to different graphql endpoints, so it can connect to:
example.com/graphql
,anothereweb.com/graphql
and so on.I want to have just one build, so I need a way to pass from the parent the endpoint that the widget should use to connect. Moreover, it can't be done through props, because Apollo initilization occurs in
main.js
(not in a component).How can I deal with this? Thanks in advance!