fix: add subscription member decorator for GraphQL que… #623
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
Increase the info security of GraphQL to sensitive data.
Description
This change aims to modify how the subscriptions in GraphQL are exposed to the public. After these changes, the allSubscription query from GraphQL will check if the user is authenticated. We have 4 main changes here:
Checklist
Testing and evidence
User accessing their own subscription data:
https://github.com/basedosdados/backend/assets/5381250/fe921aee-9df5-4ab1-b6b1-61ef371c283e
User accessing others' subscription data:
https://github.com/basedosdados/backend/assets/5381250/842f2350-534d-4559-98c7-e7f12cdf5e21
Not logged-in user trying to access subscription data:
https://github.com/basedosdados/backend/assets/5381250/4e285c97-7212-4879-a127-f1b5d0b974ba