-
Notifications
You must be signed in to change notification settings - Fork 89
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
Usage of ParseIDs Middleware in Subscription #122
Comments
Right, this is a good question. Here's the issue generally: Right now middleware doesn't work with subscription Your specific error message is a slightly different problem, this happens because you've added middleware to the field but haven't added a resolver. If middleware is added to a field via the Possible solutionsHonestly I'm not entirely sure what the best approach here is. Perhaps the best option is to create a middleware like mechanic that operates directly on the AST for stuff like argument transformation, and move ParseIDs to using that. |
I just ran into this issue as well. It's easy enough to parse the global ID in the config function (or convert to a global ID in the trigger I guess), but it took me a few minutes to understand that the middleware wasn't working like I assumed it would. Perhaps adding a note in the moduledoc for |
@jcelliott PR welcome for that note! |
When trying to use the
Absinthe.Relay.Node.ParseIDs
middleware for arguments in subscriptions, the following error is thrown.If you're interested I could build a PR to solve the issue.
The text was updated successfully, but these errors were encountered: