4 ms·
I like GraphQL a lot — but found that writing mutations involved a ton of boilerplate. For example, I'd have to keep writing the same key names over and over ag
by RoboTeddy 7y ago
I like GraphQL a lot — but found that writing mutations involved a ton of boilerplate. For example, I'd have to keep writing the same key names over and over again. Anyone else experience this?
- KenanSulayman 7y agoYou could use input types and reduce the boilerplate to a single parameter, which you then send as an object in the request variables?
- fernandotakai 7y agoyeah that's what i did. inputs also help a bit with code reuse, imho.
- crucialfelix 7y agoYes, Mutations are still annoying to write. Especially with all the optimisticResponses and pushing things into collections.