Hi all, I'm new to graphql, and I was wondering wh...
# graphql-kotlin
v
Hi all, I'm new to graphql, and I was wondering what is the best way to implement queries/mutations with restricted access based on user rights? in a restful api we would make endpoints restricted, I'm not sure how to approach this with graphql. I'm using ktor as well and graphql-kotlin. Thank you!
d
v
Thank you, I'll look into them 🙂
r
is there a best practice which could be added to to the docs? Or even code to graphql-kotlin-spring-server?
d
I’m thinking that the best place for those conversations would be under https://help.github.com/en/github/building-a-strong-community/about-team-discussions
unfortunately it is still in private beta 😞
in the meantime we can probably add some high level overview to the docs
as for the reference implementation - well it is a very broad topic and there is quite a few ways this could be implemented so I don’t think we will be adding it to the
spring-server
data fetchers are plain java classes
they don’t know anything about suspendable functions nor monad types
👍 1
any specific reason you need to store mono in the graphql context instead of unwrapping it?
r
Nope, I overlook that GraphQLSecurityContextFactory uses `suspend`for the generateContext, which makes it super easy to use later 👍
d
👍 yeah its suspendable so we can access reactor context through their nice interop