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

Lokka with components (like Relay) #10

Open
smolinari opened this issue Feb 5, 2016 · 3 comments
Open

Lokka with components (like Relay) #10

smolinari opened this issue Feb 5, 2016 · 3 comments

Comments

@smolinari
Copy link

Hi,

Would it possible to do GraphQL queries within components, like it is possible with Relay and React components? If it isn't possible, what would need to happen (at a high level) to make it possible?

Scott

@arunoda
Copy link
Contributor

arunoda commented Feb 5, 2016

@smolinari
Copy link
Author

Hey arunoda. I appreciate your time and lokka is very exciting for me, as it seems to be the answer to my problem, (which I honestly haven't tried to dig into quite yet).

Actually, now I remember I asked something similar and was pointed to the usage of fragments then too. Sorry for the doubled up question.

I guess I am too inexperienced to piece this together and I guess I need to be more specific with my problem.

What I am looking for is using lokka within Vue.js components. I also like Vuex for the data store, but I would assume lokka is doing the "store" part. In fact, lokka would be doing the vue-resource part too. Is that correct?

How would lokka collect the queries/ fragements among component hierarchies and dispatch them to get the data from the server? One of the goals of GraphQL is to reduce calls to the server, especially on initial page rendering, isn't it? I think lokka and Vue,js could be a great pairing. Imagine design, behavior and data definitions all within each component. That would blow away React.

Scott

@Type1J
Copy link

Type1J commented Feb 24, 2016

I'm not sure, but I think in addition to the component definitions, you wanted to see where the query was made and the data binding happened. Here:

https://github.com/kadira-samples/meteor-graphql-demo/tree/master/client/containers

The first link (by @arunoda) was to the React components, which define their fragment of the data as well. This link is where the queries are sent and bound to those components.

I hope that helps.

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

No branches or pull requests

3 participants