bug: modify response/request rule does not work in GET GraphQL requests

Open
#35 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
graphql, typescript
Domain
api, devtools

Research direction

Start with the rule parser in the extension and desktop app, then inspect app/src/components/mode-specific/desktop/InterceptTraffic/WebTraffic/TrafficExporter/harLogs/utils.ts, especially how GET queryParams are represented. Reproduce the GraphQL GET request from the issue and trace the matcher for operationName and query parameters. Done means matching response/request rules apply to GraphQL GET requests in both tools.

Written by the indexing model from the issue text.

Description

Describe your issue?
  1. The rule parser in both extension and desktop app only match GQL operationName in request body and not from queryParams in case of GET request

  2. The network traffic table in both extension and desktop app do parse queryParams as well but the actual rule matcher does not. requestDetails.requestData is undefined in case of GET requests. Refer here

  3. GQL requests like https://www.producthunt.com/frontend/graphql?operationName=HeaderDesktopProductsNavigationQuery&variables=%7B%7D&extensions=%7B%22persistedQuery%22%3A%7B%22version%22%3A1%2C%22sha256Hash%22%3A%22b837580ad37ccb60cafa1e4dca02cedfcb1d60dd6742323032ee0f64204fc579%22%7D%7D are not matched by graphql filter

Repro steps

Try to create a GraphQL response/request rule to apply on a GET request where operationName and query is passed through query params. Check rule wont be applied.

What Requestly tool were you using?
  • Extension
  • Desktop-App
  • Android SDK
  • Selenium
Your Environment

Chrome 142

Requestly Version

25.9.24

Error screenshot

No response

Dominant language
TypeScript
Stars
87
Forks
23
Avg merge
14h
Merged PRs (30d)
3

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from requestly/interceptor

All issues in requestly/interceptor

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.