Consider a graphene view at /api/graphql-endpoint: Requests to individual queries will show up the same, even though the request object would be able to have a query name parsed out.
Potential solution
Two things are needed:
An optional custom label field for Request model
If there was a label / title to give requests for what to show in /silk/requests/ instead of request.path
django silk: 5.0.1
Limitation
Consider a graphene view at
/api/graphql-endpoint
: Requests to individual queries will show up the same, even though therequest
object would be able to have a query name parsed out.Potential solution
Two things are needed:
An optional custom label field for
Request
modelIf there was a
label
/title
to give requests for what to show in /silk/requests/ instead ofrequest.path
An optional callback in
RequestModelFactory.construct_request_model()
to customize the contents ofmodels.Request
.It will have accessed to to the django
HttpRequest
viaself.request
to fetch any necessary metadata and write a label