I am aware this could be topic of controversial points of view, but I am really interested in others opinion.
Using GraphQL for some time I find it tiresome to access response data manually like:
has_next_product_variants_page = response['data']['product']['variants']['pageInfo']
It's highly repetitive and error prone.
For Python there is the Simple GraphQL Client, which can create code to convert the JSON query to result objects which one can access like:
has_next_product_variants_page = response.data.product.variants.pageInfo
Here the IDE and type checking can help you identifying errors. On the minuses side one wold have to generate the code for every query, otherwise you would loose the benefits of just retrieving the information you need and not the whole object (eg. Product, Collection). This would be a downgrade to GraphQL fetched REST.
Has anybody experience with libraries like this?
What are your thoughts?