| ▲ | fcpguru 2 days ago | |||||||||||||||||||||||||
i wrote this a few weeks ago: https://gist.github.com/andrewarrow/c75c7a3fedda9abb8fd1af14... 400 lines of QL vs one rest DELETE / endpoint | ||||||||||||||||||||||||||
| ▲ | gideon60 2 days ago | parent | next [-] | |||||||||||||||||||||||||
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? | ||||||||||||||||||||||||||
| ||||||||||||||||||||||||||
| ▲ | throwaway613745 2 days ago | parent | prev | next [-] | |||||||||||||||||||||||||
wut we have a mixed graphql/REST api at $DAY_JOB and our delete mutations look almost identical to our REST DELETE endpoints. TFA complains needing to define types (lol), but if you're doing REST endpoints you should be writing some kind of API specification for it (swagger?). So ultimately there isn't much of a difference. However, having your types directly on your schema is nicer than just bolting on a fragile openapi spec that will quickly become outdated when a dev forgets to update it when a parameter is added/removed/changed. | ||||||||||||||||||||||||||
| ||||||||||||||||||||||||||
| ▲ | roscue 2 days ago | parent | prev [-] | |||||||||||||||||||||||||
I feel you. But I think this might have more to do with the cursed design of the Shopify order editing API than with GraphQL itself. | ||||||||||||||||||||||||||