redux-requests icon indicating copy to clipboard operation
redux-requests copied to clipboard

Support allow credential config in graphql.

Open theigwe opened this issue 4 years ago • 5 comments

I really do love this package. Does a whole lot. Before I migrate, is there a way to handle credentials sending from browser. Example sending cookies automatically using the graphql driver just like in apollo client?

theigwe avatar Oct 15 '21 14:10 theigwe

I am glad you like it! And sure! Graphql driver uses axios under the hood, but I am not sure we won't need to add a small thing to this driver. Please see here - https://github.com/klis87/redux-requests/blob/master/packages/redux-requests-graphql/src/graphql-driver.js#L39 For example we support headers, but there is no cookie option. Please tell me, if you need any axios option passed which is not supported just yet. If there is such, we will just add it

Btw, for global logic for authentication, it will be then easy to add in onRequest interceptor. The only thing we need to check is this axios config option for a potential extension.

klis87 avatar Oct 21 '21 11:10 klis87

I was able to handle this.... But it will great if I wouldn't have to create custom driver to achieve this. I created a pull request for the fix I used in my project.

theigwe avatar Oct 21 '21 17:10 theigwe

I really appreciate your PR, thanks! I already reviewed it, looks very good but I would really like it to push it a little more, so we could handle even more use cases.

klis87 avatar Oct 22 '21 23:10 klis87

As much as I understand, @theigwe mentioned pull request was abandoned. @klis87 do we still interested on fixing this issue? I would be glad to make another PR

cpoftea avatar Feb 06 '24 16:02 cpoftea

@cpof-tea Totally, at the moment I cannot work on it myself as I am focused on https://github.com/klis87/normy , which is just improved normalization logic taken from redux-requests. Once finished, I will use it for redux-requests and only then I will go back to developing this lib.

In the meantime, I will be grateful for PR, thanks!

klis87 avatar Feb 06 '24 21:02 klis87