web applications - Exposing data models as graphql api with filters -
i've been playing graphql
while now, using both graphql-js
(javascript) , graphene
(python).
graphql comes relay spec pagination, awesome our schema.
find hard set mind on filters.
every database provides full query language (whether sql or nosql).
our simple web apps, need access our data, of interesting stuff happens in client side rich js frameworks.
so after reviewing few of our backend apps, can see parsers:
parsing requests rest
mongodb
or sql
.
we try provide rich queries client side, add arguments our graphql
endpoints,
every new filter requires lot of work (new code).
going rest
graphql
great,
why not take little farther more expressive language data querying?
there reason restrictions?
should keep develop "parsers"?
to clarify point made above, graphql spec not include relay , mentions nothing pagination. in fact, graphql doesn't specify network layer either choice use http implementor.
so graphql provide:
- a strong type system defining shape , relationships of data
- a query language requesting parts of data
you seem asking why graphql doesn't make query language more expressive , answer that, part, graphql unconcerned both how data retrieved data sources sql or rest clients , how data returned end-user.
it's worth noting performant query optimization huge area of study and, in things sql tuned underlying mechanisms accessing data. it's of reasons leave out have leaving data-store implementor.
Comments
Post a Comment