Allow sharing GraphQL queries as links
NetBox version
v.4.3.1
Feature type
Change to existing functionality
Proposed functionality
It should be possible to construct links that go to /graphql/ and prefill the query (and maybe variables) in the GraphiQL UI with a certain value contained in the URL.
Usually in GraphiQL, this works by using the ?query= URL parameter, but since that's used to send a GraphQL query via GET, it cannot be used when still wanting to show the GraphiQL interface.
Therefore I propose to use #query= in the URL which has the advantage to also not be sent to the server and not polluting access logs.
Use case
This is for cases where i have complex queries i want to share with my collegues in a convenient way
Database changes
No response
External dependencies
No response
I'm willing to implement this myself.
Thanks @mraerino , assigned to you.
FWIW, I ran across this GH discussion that has a couple of helpful suggestions while verifying this wasn't already possible.
@mraerino any luck with this?
Hey, sorry for the delay here. Life got in the way.
PR is now up: https://github.com/netbox-community/netbox/pull/20014