TheMakeA
Joined 14 years ago
Joined 14 years ago
So what does this look like in practice? Genuinely curious :-)
I'd rather do that and then live nearly anywhere in the 400 mile range that it provides, and probably be happier.
For sure. If I could still edit the post, I would probably change it to be something closer to "it's not really a general purpose query language like the name might imply"
It's definitely a query language, but folks start looking for the sorting/filtering/etc and get confused.
But arbitrary arguments on any other field are totally supported.
...but we had some really ugly JSON. It was worth it for us to get the readable syntax to just use GraphQL.
With client tooling like GraphiQL and editor plugins, it should just get better.
The intent is to prevent accidental/unintentional over or under fetching that leads to bugs or poor experiences.
In an attempt to help resolve this issue, I suggest that you think of it as ProductQL or ProductAPI instead.
It's not a storage layer. It's not really a query language. It's an alternative way to define an API that more closely matches the typical mental and product domains than REST.
It's critical to realize that you're implementing an API. GraphQL does not concern itself with sorting or fetching data as the name might lead you to initially believe. It has little to actually do with graphs (except they are more easily expressed). It is designed to be added on top of your application layer and business logic to provide a single, well defined API for your product and tools.
It primarily targets product developers. From the scheme/API side, it is up to the server developer to decide what to expose and how, based on the product and any technical considerations that need to be made.
This is a false dichotomy. As an anecdote, I started a 3 year lease on an EV two weeks before the Model 3 was announced and still put in a reservation.
Who cares if I can get a Volt for 33k right now? It still burns dinosaurs and has a terrible electric range.
Tesla is the press "darling" because it's doing something that the other manufactures aren't: Good looking, All Electric, High Range, Affordable Price. These are things people clearly want.
Every other vehicle sacrifices at least one of those.