Skip to content

Commit

Permalink
audius-query debug flag usage in README (#3586)
Browse files Browse the repository at this point in the history
  • Loading branch information
dharit-tan authored Jun 13, 2023
1 parent bceb3fe commit a94f035
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/common/src/audius-query/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ getTrackById: {

## Debugging

- [createApi.ts](./createApi.ts) contains the implementation of the fetch hooks. You can put breakpoints in `useQuery`. Tip: conditional breakpoints are especially useful since the core logic is shared across every audius-query hook. Try `endpointName === 'myEndpoint && fetchArgs === { ...myArgs }'` to scope down to only your own hook
- [createApi.ts](./createApi.ts) contains the implementation of the fetch hooks. You can put breakpoints in `useQuery`. Tip: conditional breakpoints are especially useful since the core logic is shared across every audius-query hook. When debugging, set `debug: true` in `hookOptions` at your hook callsite, then set `hookOptions.debug === true` as the breakpoint condition. Can also try `endpointName === 'myEndpoint && fetchArgs === { ...myArgs }'`.
- Redux debugger - all the data is stored in `state.api['reducerPath']`, and actions are named per endpoint:
- `fetch${capitalize(endpointName)}Loading`
- `fetch${capitalize(endpointName)}Succeeded`
Expand Down

0 comments on commit a94f035

Please sign in to comment.