Improve handling of option-heavy input parameters (e.g. Hasura) #495
Labels
client
GraphQL Client module
enhancement
New feature or request
tools
Issue related to Caliban tools like code generation or schema comparison
In my experiment of migrating existing codebase (relying on Hasura graphql engine) I found out that the current Caliban approach to code generation is a bit cumbersome to work with in this particular case.
For the following graphql query that we had before
we had a
sbt-graphql
-based client that allowed us to execute it like this:With caliban, the same call in trivial impl has a form of
The problem originates from option-heavy, machine-generated types coming out of hasura engine. Examples for reference:
So its significantly longer due to the fact that the query is constructed in scala and not graphql. This issue was originally discussed on discord channel and the following was mentioned:
.some
syntaxExample
So the goal could be to have an API similar to:
Leaving it here as a feedback and reference point for further discussions
The text was updated successfully, but these errors were encountered: