Add EffectfulQueryBuilder for higher-level API on top of RootEffect / GenericMapping #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Initial rough attempt at a higher-level library API combining
RootEffect
andGenericMapping
to build a read-only GraphQL API. Trying to add some type-safety to the arguments and hide away select elaboration,RootEffect
,genericCursor
etc, behind a builder pattern. Managed to allow constructingEffectfulQuery
values independently and compose them; eventually callingbuild
with a schema to create the mapping. Ideally the schema / queries would be tied together at compile time, but I imagine that would be wholly invasive and quite complicated... The Caliban library seems to do that, though it didn't work as expected when I last tried it.Still needs a lot of tidy up, particularly to make adding arguments better. Perhaps another builder pattern in the construction of an
EffectfulQuery
, to avoid the verbosearg1
,arg2
constructors.Note to self - this is currently blocked by there being no way to create a
CursorBuilder
other than usingsemiauto
which is in the mapping scope. Ask for help on this - either that can be extracted or we can add options for manual creation ofCursorBuilder
s, similar to circeEncoder
s.