3 ms·
Feels like a schema design issue? If your REST backend exposes a single path to remove an item, are there any reason why your GraphQL schema doesn't expose a r
by gideon60 10mo ago
Feels like a schema design issue?
If your REST backend exposes a single path to remove an item, are there any reason why your GraphQL schema doesn't expose a root mutation field taking the same arguments?
- fcpguru 10mo agoyeah tell shopify, it's their api!
- johnjames4214 10mo agoExactly. If it's that verbose and painful for a public API like Shopify/GitHub (where the 'flexibility' argument is strongest), it makes even less sense for internal enterprise apps. We are paying that same complexity tax you described, but without the benefit of needing to support thousands of unknown 3rd-party developers.
- n_e 10mo agoThe issue is that the API itself is, I assume, badly designed. Equivalent delete queries in rest / graphql would be curl -X DELETE 'https://api.example.com/users/123' vs curl 'https://api.example.com/graphql?query={ deleteUser(id: 123) { id } }'