-
-
Notifications
You must be signed in to change notification settings - Fork 522
-
What is the best practice for deciding when to use an ApolloQuery component in the template vs declaring a smart query in the Vue component options? When should you use one instead of the other - or is this just a matter of personal taste?
They both achieve roughly the same thing and both are more or less "declarative" as far as I can tell. I've been leaning towards using ApolloQuery components for everything though the advantages seem limited and I wonder if there are cases where declaring smart queries is preferable?
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 3
Replies: 2 comments
-
@sgarner As far as I understand you cannot access $apollo instance / option / query anywhere in your script if you use the component variant, correct me if I'm wrong.
Beta Was this translation helpful? Give feedback.
All reactions
-
@andreiscripcaru22 probably you can access $apollo of the query component via $refs.
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1