Skip to content

Architecting Vuex app that uses GraphQL

Summary

I’m working on a Vuex app which is currently behind feature flag;

This app is using GraphQL to fetch initial listing but those list items are actionable, and for performing actions, I’m using traditional Rails API (POST & DELETE).

Our Frontend Guide currently covers GraphQL and Vuex as two separate topics;

  1. Handle networking in Vuex architecture.
  2. GraphQL in Vue.

But we don’t have any set of recommendations with both are combined, and my MR https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/14248 touches that area.

I personally insist on following our Vuex architecture where we keep networking logic in actions,js (even if it involves fetching data using GraphQL), but I want to know what our team thinks on that.

Edited by Kushal Pandya