-
-
Notifications
You must be signed in to change notification settings - Fork 312
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
Query/Mutation components #1132
Comments
I wouldn't use it, that's why I decided to not implement it. Here's what I did back then: https://stackblitz.com/edit/apollo-angular-token-service-directive?file=app%2Flist.component.ts, instead of a component, it was a directive. |
If you want, feel free to implement it :) |
Could you elaborate on why you would not use it ? Would you use the query component in React ? |
About React, that's why I was trying it out, because I used it there. I personally, don't like Render Props pattern, it's just ugly and adds a noise to the component, in most cases the Higher Order Component pattern was my first choice. About Angular, I tried it out and it felt odd. Since we're using HTML and an operation will be available in I think it would make more sense once Ivy lands, we get those mixins and hocs. I was consider to work on it a while ago but I will still wait to a stable version of Ivy. |
Wouldn't be interesting to have Query and Mutation components as the ones we have on react-apollo ?
Basic query component usage would be (with the render prop pattern) :
where the query in the component would be:
and a basic implementation of the Query component (Render Prop use case) would be:
The text was updated successfully, but these errors were encountered: