In
π
Make store API paths/uris configurable via environment variables (and eventually drupalSettings)
Needs work
we introduced baseQuery which takes care of auto-replacing {entity_type}
and {entity_id}
in API paths.
When I wrote this I thought it was a good idea, but on client projects since I've been favouring requiring the params to be explicitly passed to any invocation of any API methods returned from rtk-query as the 'extra' argument.
This makes it more evident which components depend on the configuration values (e.g. entity type and id) rather than transparently (magically?) hiding it in the baseQuery
Make the all callers of query functions from the API client pass along entity type and ID themselves https://redux-toolkit.js.org/rtk-query/api/createApi#queryfn
Active
0.0
Page builder