News for hackers. Stuff that matters.
Re:Migrating Netflix to GraphQL Safely by evangow on Sunday June 18, 2023 @03:04PM (#36383268)
You can make a REST endpoint match a client's needs, but if you have multiple clients (for example, 1 for mobile and 1 for desktop) that all need different amounts of data (for example, the mobile client shows a simplified view with less data), then you would need to write 2 different REST endpoints to handle each clients. Multiply that by the number of pages with a difference.
Re:Migrating Netflix to GraphQL Safely by troupo on Sunday June 18, 2023 @06:43PM (#36385297)
> then you would need to write 2 different REST endpoints to handle each clients.

Or you use Accept header for its intended purpose

Accept: com.company.user-aggregated/json

Accept: com.company.user-aggregated-lite/json

etc.

And let the server return the fields defined by the relevant schemas.

I mean, the advise given for GraphQL in prod is to literally call predefined queries only.