This repository has been archived by the owner on May 16, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 82
How would I handle query/mutation authentication? #44
Comments
pqt
changed the title
How would I handle authentication?
How would I handle query/mutation authentication?
Dec 21, 2018
Hey @pqt! I'm happy that you find KGraphQL useful! You are right - context is meant to be container for authorization data. Unfortunately, it has limitations: you can only use it in root level queries and mutations, see #42. I hope I will find time soon to extend context variable access to properties. I'm sorry it took me so long to respond. |
Thanks a lot for making this project! Really cool and useful! |
I ended up actually having to put the prototype on hold (for now) because of this limitation, but I still think you've got a great project here! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hey!
First of all, I want to thank you @pgutkowski for making this, it's been a great help in working with GraphQL and Kotlin, taking away a lot of the headaches I was running into before finding this.
Overall my implementation went fairly smooth. I am able to resolve queries and mutations accurately and even have registration for an app completely done.
My problem now though, is trying to blend Ktor's JWT and specific queries/mutations together.
I can protect the graphql route entirely , but that doesn't work well for th registration and login process.
I know there's a
context
variable onschema.execute
but I'm not certain if this is how I should be passing authentication data down stream.The text was updated successfully, but these errors were encountered: