Closed Kashuab closed 1 year ago
Opted for adding a primitives
key to the selector proxy. This is a better approach as developers won't need to import anything to accomplish this.
selectFromUserBaseModel(user => user.primitives.posts(post => post.primitives));
primitives
also has some auto-generated documentation that tells you what you'll get:
One thing that I loved about
mst-gql
was that it generated selectors for primitive fields on each model.For example, instead of this:
data => data.token.user(user => user.email.firstName.lastName.createdAt.updatedAt)
I'd like to do this instead:
data => data.token.user(userModelPrimitives)