{"action":"created","issue":{"url":"https://api.github.com/repos/Akryum/vue-apollo/issues/140","repository_url":"https://api.github.com/repos/Akryum/vue-apollo","labels_url":"https://api.github.com/repos/Akryum/vue-apollo/issues/140/labels{/name}","comments_url":"https://api.github.com/repos/Akryum/vue-apollo/issues/140/comments","events_url":"https://api.github.com/repos/Akryum/vue-apollo/issues/140/events","html_url":"https://github.com/Akryum/vue-apollo/issues/140","id":270372099,"node_id":"MDU6SXNzdWUyNzAzNzIwOTk=","number":140,"title":"vue-apollo and vuex interaction best practices","user":{"login":"alidcastano","id":11031952,"node_id":"MDQ6VXNlcjExMDMxOTUy","avatar_url":"https://avatars0.githubusercontent.com/u/11031952?v=4","gravatar_id":"","url":"https://api.github.com/users/alidcastano","html_url":"https://github.com/alidcastano","followers_url":"https://api.github.com/users/alidcastano/followers","following_url":"https://api.github.com/users/alidcastano/following{/other_user}","gists_url":"https://api.github.com/users/alidcastano/gists{/gist_id}","starred_url":"https://api.github.com/users/alidcastano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alidcastano/subscriptions","organizations_url":"https://api.github.com/users/alidcastano/orgs","repos_url":"https://api.github.com/users/alidcastano/repos","events_url":"https://api.github.com/users/alidcastano/events{/privacy}","received_events_url":"https://api.github.com/users/alidcastano/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":23,"created_at":"2017-11-01T16:43:33Z","updated_at":"2018-12-12T14:06:16Z","closed_at":"2017-11-02T13:38:21Z","author_association":"NONE","body":"Hi @Akryum! \r\n\r\nApollo's cache and vuex's store seem to have some overlap in terms of usage, so how would you recommend using vue-apollo and vuex together? \r\n\r\nThe usual approach with REST would be to have a folder that holds the api service and a folder that holds the state store (this is how [Gitlab does it](https://docs.gitlab.com/ce/development/fe_guide/vue.html)), and then have it all come together inside the main component; another approach is to have the api service/calls integrated into vuex actions.\r\n\r\nMy first instinct was to use the vanilla apollo plugin and follow one of the above approaches. But then I realized that graphql is a different paradigm - the component queries and mutates its own data - hence why you tightly integrated query fetching inside components. So it'd be great to have the creator of the plugin weigh in on best practices.\r\n\r\nThanks\r\n\r\n// This is to related issue #7, so I'll cc people who might be interested in this discussion @PierBover @sebT @RichAyotte @smolinari"},"comment":{"url":"https://api.github.com/repos/Akryum/vue-apollo/issues/comments/446599108","html_url":"https://github.com/Akryum/vue-apollo/issues/140#issuecomment-446599108","issue_url":"https://api.github.com/repos/Akryum/vue-apollo/issues/140","id":446599108,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NjU5OTEwOA==","user":{"login":"smolinari","id":3314957,"node_id":"MDQ6VXNlcjMzMTQ5NTc=","avatar_url":"https://avatars0.githubusercontent.com/u/3314957?v=4","gravatar_id":"","url":"https://api.github.com/users/smolinari","html_url":"https://github.com/smolinari","followers_url":"https://api.github.com/users/smolinari/followers","following_url":"https://api.github.com/users/smolinari/following{/other_user}","gists_url":"https://api.github.com/users/smolinari/gists{/gist_id}","starred_url":"https://api.github.com/users/smolinari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smolinari/subscriptions","organizations_url":"https://api.github.com/users/smolinari/orgs","repos_url":"https://api.github.com/users/smolinari/repos","events_url":"https://api.github.com/users/smolinari/events{/privacy}","received_events_url":"https://api.github.com/users/smolinari/received_events","type":"User","site_admin":false},"created_at":"2018-12-12T14:06:16Z","updated_at":"2018-12-12T14:06:16Z","author_association":"NONE","body":"FYI also. apollo-link-state has been moved into the Apollo client core, so the idea of getting rid of Redux or Vuex has become a first class citizen. Version 2.5.0 of Apollo Client will include it and the alpha is basically ready for testing now. \r\n\r\nScott "}}
{"actor":{"display_login":"smolinari"}}