Re:GQless: A GraphQL client built for rapid iteration
by atom_arranger on Wednesday June 02, 2021 @06:59PM
(#27375070)
This solution seems to work like this:
- Generate type safe client based on your schema.
- Access GraphQL properties as if they were just JS object properties.
So in this solution the codegen step comes before writing a query.You get the same advantages pretty much, and you have less likelihood of querying for unused data.
It’s pretty killer to open GraphiQL, write a new query, drop it into a graphql file in my repo, rerun the codegen, and be able to have type safe operations on the queried data.
Also makes me completely unsure why anyone would want what the OP is but that’s ok