Skip to content

RTK Query - Allow injectEndpoints to also provide tagTypes #1510

Closed

Description

Hello!

I've been using RTK query with quite a bit of success. The injectEndpoints API is pretty useful for splitting endpoint definitions across multiple modules and even across multiple projects. The project I'm working in has 2 apps with a shared common library, and injectEndpoints allows me to define a base API definition in the common library and then add app-specific endpoints in each app's respective codebase.

However, it's a bit odd that I still need to define all tagTypes at the root createApi call, as injectEndpoints has no option for that. I don't see anything logically in the way of being able to do this, and I assume the use case simply hasn't been suggested yet.

Please let me know if this is infeasible for an architectural reason. I can work around this for now, but it's not exactly ideal. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions