-
Notifications
You must be signed in to change notification settings - Fork 45
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
CookieOverflow for Own Schema Mount #112
Comments
It's a long shot, but could you please try enabling eager_load? I'm thinking it might be related to the devise mapping being added when the request is made, instead of it loading when the routes are loaded and no user has been identified. |
Tried setting |
OK thanks. I'll look into this ASAP. A fix for now might be keeping the mount method on the routes and skip all operations with |
For now, I actually just changed to activerecord_storage instead of cookie_store to handle that bigger payload 😂 Now that you mentioned it, I think your workaround is a lot better 😂 Thanks man! |
Describe the bug
When using the own schema mount option, our session cookie overflows. This happened immediately after I removed the routes.rb mount option. This is due to the value being saved in the session for 'warden.user.user.key' to be the entire object rather than some string or integer.
Environment
Steps to reproduce
graphql_context(:user)
to authenticate the user.Expected behavior
It should just return something like this when accessing the session object, instead of putting the entire activerecord object.
Actual behavior
It returned the entire object instead of just an id and some key.
Reproducible demo
Tried using the dummy app found in the gem. Here are the steps I did to reproduce the problem:
This would essentially make the User resource to be solely mounted in the graphql schema only.
2. Add :logout in the User resource loader in the dummy schema file. This will be used for the demo.
3. Change the post request for the logout spec to use the 'graphql' schema instead of the default 'graphql_auth' one.
4. Put a
binding.pry
first line in the resolve function for the logout mutation and check forcontroller.session.to_h
The text was updated successfully, but these errors were encountered: