Kashuab / mobx-depot

Scaffold MobX-powered models, queries and mutations with your GraphQL schema.
https://mobx-depot.dev
MIT License
8 stars 0 forks source link

Consider local state management use-cases #31

Open Kashuab opened 1 year ago

Kashuab commented 1 year ago

For some complex apps that need to stage working data, mobx-depot could lend a hand with its data store. Its ability to resolve and maintain dependencies could've relieved a lot of headache in projects I've worked with in the past.

Kashuab commented 1 year ago

The following approach seems ideal:

  1. Create a schema.graphql for the local types
  2. Use the generate CLI to generate a root store and models

Questions:

Answers:

I think in an ideal scenario there is only one RootStore within a project. The solution here may be to allow generate to accept multiple schemas. However, the big question here is: how would we handle duplicate types? There may be local state that should never make it to the remote API.

Kashuab commented 1 year ago

Not a pre-release issue, but this is still important.