purescript-graphql icon indicating copy to clipboard operation
purescript-graphql copied to clipboard

Allow to change the context in subfield through resolver

Open hendrikniemann opened this issue 5 years ago • 0 comments

In theory we could allow to change the context of child fields. This might be possible by adjusting withResolver so that the resolver could switch the context. I think this is wrong but maybe it conveys the idea:

- withResolver :: forall m a b argsd argsp.
+ withResolver :: forall m n a b argsd argsp.
    MonadError Error m =>
-   Field n a argsd argsp ->
+   Field n a argsd argsp ->
    (Record argsp -> b -> m a) ->
    Field m b argsd argsp

I can't really think this through right now, but maybe some ideas come up...

hendrikniemann avatar Jul 27 '20 15:07 hendrikniemann