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

Notification not queriable without operator cookie #191

Open
ignazio-bovo opened this issue Sep 14, 2023 · 1 comment
Open

Notification not queriable without operator cookie #191

ignazio-bovo opened this issue Sep 14, 2023 · 1 comment
Assignees

Comments

@ignazio-bovo
Copy link
Contributor

ignazio-bovo commented Sep 14, 2023

Problem

Currently any account is not able to access his own notifications because notification are hidden entities.
Specifically the notification, notification in app and in mail delivery are inside the admin schema and not exposed through any view

notification_email_delivery: ['FALSE'],

Temporary solution

make them non-hidden on atlas-dev so the testing can progress.
Because at the moment notificatification are inside the admin schema and not expos

Permanent solution

Create a bespoke resolver allowing atlas to query notifications via the in app delivery table

@ignazio-bovo ignazio-bovo added bug Something isn't working notifications labels Sep 14, 2023
@ignazio-bovo ignazio-bovo self-assigned this Sep 14, 2023
@ignazio-bovo
Copy link
Contributor Author

ignazio-bovo commented Sep 25, 2023

I have discovered that setting up an appropriate resolver that satisfies Atlas requirement:

  • open crud where clause with logical conditionals, eg:
where: {
  account: { joystreamAccount_eq: accountId },
  OR: [
    { createdAt_gt: "2023-09-22 12:00:00", recipient: { isTypeOf_eq: 'ChannelRecipient', channelId_eq: "channel1" },
    { createdAt_gt: "2023-09-22 13:00:00", recipient: { isTypeOf_eq: 'ChannelRecipient', channelId_eq: "channel2" }
  ]
}
  • supports pagination

Is a complex task, also I have established that account information leakage due to joins on account private entity starting from notification is not possible if notification is a public entity

graphql_not

schema_not

Which means that we can safely roll out publicly accessible notifications in v1 and then make it private and queriable via an appropriate resolver in v2

@ignazio-bovo ignazio-bovo added tech-debt Technical debt and removed bug Something isn't working labels Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants