graphql-network-inspector
graphql-network-inspector copied to clipboard
Extract `operationName` for GET persisted operations
Description
PR to address issue https://github.com/warrenday/graphql-network-inspector/issues/148
Set operationName
in IGraphqlRequestBody
for GET persisted queries. It was missing and is needed to correctly display it in the Query/Mutation column.
Screenshot
Provide a screenshot or gif of the new feature in both dark and light mode.
Checklist
- [x] Displays correctly with both dark and light mode (see useTheme.ts)
- [x] Unit/Integration tests added
I added a test to check that it does return correctly the operation name for persisted get requests.
However the project Main.test.tsx
files uses mockRequests
which contains only POST requests, therefore this bug was not detectable with the current test suite. I think adding tests for GET requests too is bigger than the scope of this fix and should be done by a regular maintainer of the project.