Call the router match functions directly

I have a kind of unusual situation (I’m probably doing something wrong) where I’d like to parse a URL with the router manually.

The context is that I have a GraphQL request that executes from a page and passes a referrer header. I’d like to pass the referrer through the routers parsing functionality to determine if it matches a particular route and if it does, to automatically parse the id from the path along with query params etc.

I’m having some trouble formulating what exactly I should be searching for in the docs as most of the docs talk about the functions used to configure the router (which makes sense) rather than how to use it to parse URLs.

Can someone give me a pointer to what router functions / module I could be looking for?

1 Like

I am on my phone but there is a route_info function or similar in Phoenix.Router. Check the Reflection section on the sidebar.

Exactly what I was looking for but couldn’t find. Thank you!