Closed matthewmueller closed 8 years ago
hey this is a cool library, i'm starting to think about the same thing.
I was wondering if you thought about using normalizr going the other way for mutations. Something like this:
mutation:
user.create({ name: 'matt', notes: [ { id: 123, title: 'blah', body: 'hi' } ] })
normalized:
entities: { users: [ { name: 'matt', notes: [1] } ], notes: [ { id: 123, title: 'blah', body: 'hi' } ] }
database inserts:
INSERT INTO users VALUES (...) INSERT INTO notes VALUES (...)
any downsides you foresee with this approach?
I'm not quite sure what you are proposing?
hey this is a cool library, i'm starting to think about the same thing.
I was wondering if you thought about using normalizr going the other way for mutations. Something like this:
mutation:
normalized:
database inserts:
any downsides you foresee with this approach?