Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support allow credential config in graphql. #487

Open
theigwe opened this issue Oct 15, 2021 · 5 comments
Open

Support allow credential config in graphql. #487

theigwe opened this issue Oct 15, 2021 · 5 comments

Comments

@theigwe
Copy link

theigwe commented Oct 15, 2021

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?

@klis87
Copy link
Owner

klis87 commented Oct 21, 2021

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.

@theigwe
Copy link
Author

theigwe commented Oct 21, 2021

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.

@klis87
Copy link
Owner

klis87 commented Oct 22, 2021

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.

@cpoftea
Copy link

cpoftea commented Feb 6, 2024

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

@klis87
Copy link
Owner

klis87 commented Feb 6, 2024

@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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants