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

client not getting session data for mutate call #844

Closed
xmlking opened this issue Jan 24, 2023 · 3 comments · Fixed by #847 or #871
Closed

client not getting session data for mutate call #844

xmlking opened this issue Jan 24, 2023 · 3 comments · Fixed by #847 or #871
Labels
Bug Something isn't working like it should

Comments

@xmlking
Copy link

xmlking commented Jan 24, 2023

Describe the bug

for fetch call, I am getting session data as expected

image

But, for mutate call, same client not printing the session data

image

My client
hook where I set token into session.

Severity

serious, but I can work around it

Steps to Reproduce the Bug

https://github.com/xmlking/svelte-starter-kit

Reproduction

https://[email protected]/xmlking/svelte-starter-kit.git

@AlecAivazis
Copy link
Collaborator

hey @xmlking 👋

I found some time today to dig into this and the issue is that you are on the server so the normal session injection isn't working. Atm there's no way to pass the event to the mutation so that it can be picked up like it is for queries. I'll make sure this is fixed for 1.0

@AlecAivazis AlecAivazis added the Bug Something isn't working like it should label Jan 25, 2023
@AlecAivazis AlecAivazis mentioned this issue Jan 25, 2023
5 tasks
@AlecAivazis
Copy link
Collaborator

#847 adds an event field to mutate's second argument that you can pass to get fetch and session injected correctly

@xmlking
Copy link
Author

xmlking commented Jan 25, 2023

@AlecAivazis awesome! thanks a lot for your quick support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working like it should
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants