
GraphQL Query Generator - oczek
https://blog.graphqleditor.com/graphql-query-generator/
======
blahbhthrow3748
We're looking at adopting GraphQL and for writing a CRUD app it seems insane.
Being able to project out individual fields seems like a niche benefit for
bandwidth constrained devices. Instead of doing joins in an RDBMS you write a
dataloader which merges select queries. The queries themselves seem like a lot
of repetition in the client codebase, plus the complexity of the server-side
implementation.

Am I alone in thinking this is a ridiculous solution to replace traditional
REST endpoints?

~~~
DigitalSea
>Am I alone in thinking this is a ridiculous solution to replace traditional
REST endpoints?

You're not alone. I went down the GraphQL path a year and a half ago. I was
telling everyone it was going to be the future, then I got tired. GraphQL
requires a lot of configuration and setup to get working right. The decent
implementations of GraphQL are all proprietary solutions like Apollo. When you
feel like you're spending half your time setting up a simple backend and API,
it's a red flag.

Despite efforts made to improve GraphQL, things like caching are still a
nightmare are in comparison to the out-of-the-box browser caching you get with
a traditional REST endpoint (because GraphQL implementations all use POST by
default). No plugin I tried for Apollo gave me proper caching, I even tried to
hack something together at one point.

The smaller payloads are definitely great and being able to query for specific
pieces of data is fantastic, but it's a lot of work and it's not perfect. I
found using it can make a simple app incredibly complex, then you have to
maintain the schemas, implementing data loaders requires some work to get done
right. There is a reason a lot of backend developers push back against the
suggestion of using GraphQL.

Don't get me started on things like authentication, file uploads and
protecting your server from being DDoSed or driving up your cloud computing
bill by someone creating expensive queries. There are solutions to these
things, but they require more configuration and work to get right. The fact
out-of-the-box someone can create a GraphQL server and essentially make
themselves vulnerable to a big AWS bill or have their app brought to its knees
trying to fulfill an intentionally complicated query is kind of concerning,
these things should be default settings.

I went back to REST about six months ago and never looked back.

~~~
hp_hovercraft
You're not alone. I recently took over an Elixir application that uses
Apollo/GraphQL. To say the least, making a simple change requires traversing
and updating a bunch of code in several areas. For example, if I want to add a
single field in an endpoint: Update Apollo, update the GraphQL schema, update
the resolvers, update types, update the schema. Makes me wonder what the
advantage is. Would just love to go back to a basic REST implementation.
Elixir's routing pipeline handles that so well.

~~~
mikewhy
Interesting. We're using apollo-server on top of an existing REST api and to
add a single field our process is:

\- update the graphql schema

\- implement any resolvers

and we're done. More things happen in the background, but a developer doesn't
have to do anything. It's all auto generated when the file is saved or a build
happens.

------
sawaruna
I'm working on a project right now that's applying RDF metadata schemas to
some pop culture data, and while it's not GraphQL, the idea of random queries
being generated is really interesting. Our output is aimed as researchers in
certain domains, and while we have researchers onboard developing use-cases,
the idea that some new ones could be imagined by viewing randomized queries
sounds possible.

------
Alan-Cha
Hey! I helped write the GraphQL query generator! Thank you so much for
highlighting our library! This was a very pleasant surprise in the morning. I
think your article does a very good job at summarizing our library, its
benefits, and its uses. I would love to know about your experience using our
library. In any case, this was super cool!

------
heelix
What is the current 'leading' library for creating a Java based GraphQL
endpoint? We are getting limited asks to move that direction, and it seems
like the 'modern' bits are all node.js based. We will see if a variable
payload is something our internal folks will bit on.

------
aexol
Nice library, especially for testing and chaos engineering. Great Idea!

------
lowmemcpu
That editor (in the gif) is really cool. Does anyone know if it's homebuilt,
or if they used a library for that?

~~~
agustif
I think it's the graphqleditor.com which makes sense being their blogpost.

At the end of the post you can click the button and try (as in a trial) the
graphqleditor

It's nice, but if you want a free one check altair or just use postman?

