-
-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] How use NamedResolvers with custum execution context #818
Comments
thanks , will look into the problem. |
Thanks a lot. I am glad to hear that! I have kept working on that and tried another approach, posted here and the main difference was that I used this definition for the resolution Monad:
This way I can write the constraints like that: Basically everything compiles, until this is added:
I hope that helps! Please note that I am still learning Haskell so it's very well possible that there isn't any issue with code itself. |
I am trying to create an GQL app following the »NamedResolver« Pattern, as shown in the docs and in this example.
I'd like to access the database Connection within a resolver function from a Reader Context. I cannot find anything the docs and I would be really glad to get some Details on how it is meant to work. I confess to find the types pretty complicated, so I am seeking for help.
Some code:
results in that error:
How should one change the Resolver Context, such that it is possible to access some parameters within the Resolver functions?
I have spent a long time going through the source, the docs and the examples but I was not able to figure out how this is meant to work and I would be happy for any sort of direction.
The text was updated successfully, but these errors were encountered: