Skip to content

rtkq use actual endpoint name in action.type #2995

Description

@uloco

Is there a way to use the actual endpoint name in the action type for rktq instead of api/executeQuery and api/executeMutation?

It's really hard to investigate issues with redux devtools when every dispatch is basically the same action type. I need to go through all of them and look into the payload to see which endpoint this was about, which is unfortunate.

I'd like to use the endpoint name (like createAsyncThunk does) to make this easier. Is there a way to do this?

I searched issues and docs but could not find anything about this...

Activity

  1. markerikson commented on Dec 12, 2022

    @markerikson
    Collaborator

    This is something I've been sorta griping about for a long time, personally :)

    Per @phryneas 's response, I'm not sure it is feasible to do that atm. We'd somehow have to start generating unique action types for each endpoint and change a bunch of internal logic to handle those.

  2. phryneas commented on Dec 12, 2022

    @phryneas
    Member

    Tbh. it isn't too feasible, but if it's only about the DevTools - have you tried looking into the RTK Quert tab in the devtools? You can even filter all actions for a speicifc cache entry there.

  3. uloco commented on Dec 12, 2022

    @uloco
    Author

    I can't use the devtools you are talking about when I am running in hermes on ReactNative. I need to use Flipper, which has a redux plugin, that does not have this pane unfortunately.... But thanks for pointing out, maybe I can find another way.

  4. added
    enhancement
    RTK-Query
    on Feb 6, 2024
  5. removed
    enhancement
    on Mar 18, 2026
  6. added
    ws-createapi
    on Nov 1, 2026
  7. added this to the 2.15 milestone on Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    RTK-Queryws-createapi

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions