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

error when trying to subscribe to a websocket #1385

Closed
danieldflrss opened this issue Jan 28, 2022 · 1 comment
Closed

error when trying to subscribe to a websocket #1385

danieldflrss opened this issue Jan 28, 2022 · 1 comment
Assignees
Labels
type: bug 🐛 Something isn't working

Comments

@danieldflrss
Copy link
Contributor

danieldflrss commented Jan 28, 2022

Hello, when I try to subscribe to a service through graphql, I get the following error:
TypeError: Cannot read property 'userHasPermissions' of undefined
on the file
node_modules@vendure\core\src\api\middleware\auth-guard.ts:81:14

A possible solution would be adding:
return parentType !== 'Query' && parentType !== 'Mutation' && parentType !== 'Subscription';
to the isFieldResolver function in the file vendure\core\src\api\middleware\auth-guard.ts

@danieldflrss danieldflrss added the type: bug 🐛 Something isn't working label Jan 28, 2022
@michaelbromley michaelbromley linked a pull request Jan 31, 2022 that will close this issue
@martijnvdbrug
Copy link
Collaborator

Fixed in #1881

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug 🐛 Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants