Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12111

GraphQL vs REST frontend/backend balance of work

$
0
0

I've always worked on iOS development (Swift) with REST services, but I recently started working on a project that uses GraphQL.The point is, that I feel that much of the work that was previously done by the BE, it's done by me now.

As an example, this situation I'm facing now.

Our app handles customers that interact with services (one active service per customer).I only need to know the active service to show it, but the endpoint I was given returns all services (expired ones and current) of one client, and I was told I should check if they are active or not.For doing that, I need to map all services, parse an extra layer on the object to get the expiration time, convert the time string and compare it to now() to see if it's active (this is how data is structured on the schema)

With REST, I would have received the active service on the endpoint and that's all.

My question is: is this how really GraphQL should work, or it's just that the BE team is somewhat lazy and is making the FE team do part of their work? My problem is that I don't really know how GraphQL should work on the BE, so I can't really defend my position there.

This was a little example, but I'm facing these situations everyday and I feel that most of my time I'm doing "table comparison" work instead of FE things.


Viewing all articles
Browse latest Browse all 12111

Trending Articles