Skip to content

Scaffold MobX-powered models, queries and mutations with your GraphQL schema.

License

Notifications You must be signed in to change notification settings

Kashuab/mobx-depot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project is no longer maintained.

I tried using this, and while it did work out the result was less stellar than expected. mobx-depot could definitely be improved in order to be feasible. I have a few ideas on this, however my team is not considering GraphQL for our own application stack for the future. If there is any interest in the project, I would love to work on it and perhaps implement those changes.


mobx-depot

View documentation

Scaffold MobX-powered models, queries and mutations with your GraphQL schema.

What do you get?

  • Strictly-typed Model, Query and Mutation classes auto-generated via introspection
  • A RootStore to reconcile data from your API, preserving existing instances along the way
  • A place to add your own logic to models that won't get overwritten by code generation
  • Reactivity powered by MobX
  • A UI framework-agnostic solution, though first-class support for React is provided via hooks

Which libraries is mobx-depot adjacent to?

  • Apollo client
  • mst-gql
  • ...

Depending on the structure of your schema, you could also consider local state management as a target. You could theoretically generate models using a schema without needing to interact with an external API at all.

  • Redux
  • Zustand
  • The other 10,000+ libraries out there

Expect trouble

Until this library is published on NPM with version >=0.1.0, expect trouble. There are many "pre-release" issues that still need to be tackled and tests to be written before I recommend usage. That being said, mobx-depot may "just work" for you.

If you do run into any bugs, please create an issue!

If you're interested in contributing, hit me up on Twitter. I won't have any formal guidelines for contributing until after the first release, as I want to ensure my vision for the library is clear before I start accepting PRs. Though I'm totally up to review some PRs for bug fixes!

Limitations

As is common in early development, there are limitations that will be addressed in the future:

  • Only TypeScript supported
  • GraphQL Subscriptions are not supported

Looking for the docs? View documentation

About

Scaffold MobX-powered models, queries and mutations with your GraphQL schema.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published