Skip to content

Get user location from the request #2010

Answered by ardatan
szanuje asked this question in Q&A
Discussion options

You must be logged in to vote

It depends on the environment you run Yoga in. Yoga is just a middleware. You will find the request objects and so on in the GraphQL Context and you can check the docs how to get the client's information from there. Maybe you can get the ip from a header then use another API to get the location information.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@n1ru4l
Comment options

Answer selected by n1ru4l
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants