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

Building selections is confusing when you only need the ID #35

Open Kashuab opened 1 year ago

Kashuab commented 1 year ago

It's perfectly valid to want to only get the ID of a resource. But considering they're automatically selected, it gets a bit confusing.

You can't just: data => data.resource because you have to call resource. You can't just do data.resource() either cause that throws a type error. If it didn't, it would be very misleading as you think it would automatically get all the primitives within resource.

I don't want to allow developers to be able to do data => data.resource.id because in other cases if they see it in the list of available fields, it gives the impression that they'd have to select it manually.