I fetch a list of articles in an external api using RTK Query like so (in createAPI) :
getArticles: builder.query<{ data: ArticleDTO[] }, null>({
query: () => "/api/v1/articles",
}),
It works great but now I need to get one single article and I don't have an endpoints to get one article. I was thinking to use RTK Query transformResponse to return one element from the list but I can't access the given query argument so I don't know how do do it !
Don't hesitate to ask for precision !