4 ms·
> No, that's not what I meant. I meant that RESTful APIs relate the URL to the data in a way that isn't true in GraphQL APIs. So 1. you're talking about someth
by masklinn 8y ago
> No, that's not what I meant. I meant that RESTful APIs relate the URL to the data in a way that isn't true in GraphQL APIs.
So 1. you're talking about something completely unrelated to TFA and 2. you're talking nonsense.
> Take reddit, for instance. I can clearly see a username in the url: https://www.reddit.com/user/masklinn https://www.reddit.com/user/masklinn
That's a UI component, and an explicit decision of the system's designers.
It, again, has nothing do do with APIs.
Hell, it doesn't even have anything to do with RESTful systems, https://www.reddit.com/lfskfsh8432kdb60 https://www.reddit.com/lfskfsh8432kdb60 would be just as RESTful.
> The conflation of route and content is frustrating for developing single page apps, but it maps better to my understanding of disk files and folders, thus making the URL more human readable and easier to toggle and change by hand.
Cool, so use that for situations where direct human interactions is expected or convenient, what's the issue?
> If everything was an SPA, you'd have to interact with the data through the frontend
Which you already do, the URL is part of the frontend.
And using SPAs does not preclude providing nice (and user-friendly) URLs e.g. with https://developer.mozilla.org/en-US/docs/Web/API/History https://developer.mozilla.org/en-US/docs/Web/API/History
- faitswulff 8y agoThanks for this, I've totally changed my mind!