-
Notifications
You must be signed in to change notification settings - Fork 161
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
ExecutionOptions.UserContext: object -> IDictionary<string, object> #218
ExecutionOptions.UserContext: object -> IDictionary<string, object> #218
Conversation
using System.Threading.Tasks; | ||
|
||
namespace GraphQL.Server.Transports.Subscriptions.Abstractions | ||
{ | ||
public class MessageHandlingContext : IDisposable | ||
public class MessageHandlingContext : Dictionary<string, object>, IDisposable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about that. Inside there is already a ConcurrentDictionary
for some properties. Not yet thoroughly understood this repository.
Because originally user context was object we needed to hijack it so we could add more properties into it. That's why on server side it already is a dictionary. The original user context is injected into it and available on resolvers. |
Need to make some more fixes? |
@sungam3r Would you mind fixing this merge conflict and I'll get this merged? There may be some other refactoring that we need to do for subscriptions, though this should at least get the core project working. |
Yes, I want to do it, but I did not understand the comment from @pekkah
I suspect I'm doing something wrong. I will come back to this a little later, I need to figure it out. |
No, it was how it was designed. Subscriptions needed to pass along some additional metadata. @pekkah accomplished that with the |
You can do it yourself if it is required as quickly as possible. I still need some time to figure it out myself. I do not want to commit things if I do not fully understand what I have done. Now honestly, I am very tired, I can only return to this tomorrow. |
No rush. In fact, it looks like there is only one file conflicting. I'll take care of it. |
@sungam3r good news, subscriptions still work with those changes. 🎉 |
Good |
draft fix for #217