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

Auto-select ID and __typename #13

Closed KashubaK closed 1 year ago

KashubaK commented 1 year ago

In order for RootStore.resolve to work, any resolvable type must select __typename and id. We should also consider alternative ID property names.

Also, I wonder if we should handle GIDs. This would remove the requirement for __typename as we could extrapolate it from the id. However, for models without IDs this would be troublesome.