Skip to content

[TILES-PW-3] PLU-672: backend mutations#1451

Merged
pregnantboy merged 1 commit intodevelop-v2from
tiles-password/mutation-endpoints
Mar 10, 2026
Merged

[TILES-PW-3] PLU-672: backend mutations#1451
pregnantboy merged 1 commit intodevelop-v2from
tiles-password/mutation-endpoints

Conversation

@pregnantboy
Copy link
Copy Markdown
Contributor

@pregnantboy pregnantboy commented Mar 5, 2026

Changes

Added new GraphQL mutations to support new feature:
setTableViewPassword: computes password hash and nonce to store in db. Will only succeed if Shareable links are enabled

deleteTableViewPassword: delete password hash and nonce

verifyTableViewPassword: verifies the JWT view token.

deleteShareableTableLink: should also delete password hash and nonce

How to test?

Since there is no frontend, you have to use the Apollo Server API explorer at http://localhost:3001/graphql
Prerequisite,

  1. you should be logged in to localhost:3001
  2. Created a tile

setTableViewPassword

mutation SetTableViewPassword($input: SetTableViewPasswordInput!) {
  setTableViewPassword(input: $input)
}

variables
{
  "input": {
    "tableId": "<TABLE_ID>",
    "password": "123"
  }
}
  1. When shareable link is disabled, it should fail
  2. When shareable link is enabled, it should succeed

deleteTableViewPassword

mutation DeleteTableViewPassword($tableId: ID!) {
  deleteTableViewPassword(tableId: $tableId)
}
variables
{
  "tableId": "<TABLE_ID>"
}

deleteShareableLink

mutation DeleteShareableTableLink($tableId: ID!) {
  deleteShareableTableLink(tableId: $tableId)
}
variables
{
  "tableId": "<TABLE_ID>"
}

verifyTableViewPassword

mutation VerifyTableViewPassword($input: VerifyTableViewPasswordInput!) {
  verifyTableViewPassword(input: $input)
}
variables
{
  "input": {
    "tableId": "<TABLE_ID",
    "password": "123"
  }
}
headers:
x-tiles-view-key: <SHAREABLE_LINK_SECOND_PART>

@pregnantboy pregnantboy changed the title feat: add new mutation endpoints to graphql + implementation [TILES-PW-3] PLU-672: DB schema Mar 6, 2026
@linear
Copy link
Copy Markdown

linear Bot commented Mar 6, 2026

@pregnantboy pregnantboy changed the title [TILES-PW-3] PLU-672: DB schema [TILES-PW-3] PLU-672: Mar 6, 2026
@pregnantboy pregnantboy changed the title [TILES-PW-3] PLU-672: [TILES-PW-3] PLU-672: Graphql mutations Mar 6, 2026
@pregnantboy pregnantboy changed the title [TILES-PW-3] PLU-672: Graphql mutations [TILES-PW-3] PLU-672: backend mutations Mar 6, 2026
@pregnantboy pregnantboy marked this pull request as ready for review March 7, 2026 10:14
@pregnantboy pregnantboy requested a review from a team as a code owner March 7, 2026 10:14
Copy link
Copy Markdown
Contributor

@kevinkim-ogp kevinkim-ogp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!
saw that the mutations are exposed in the next PR
the mutations are not exported from the tiles mutations index file packages/backend/src/graphql/mutations/tiles/index.ts

other than that, mutations work as intended!

Copy link
Copy Markdown
Contributor Author

pregnantboy commented Mar 10, 2026

Merge activity

  • Mar 10, 6:25 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Mar 10, 6:27 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Mar 10, 6:29 AM UTC: The Graphite merge of this pull request was cancelled.
  • Mar 10, 6:31 AM UTC: Graphite rebased this pull request as part of a merge.
  • Mar 10, 6:31 AM UTC: @pregnantboy merged this pull request with Graphite.

@pregnantboy pregnantboy changed the base branch from tiles-password/crypto to graphite-base/1451 March 10, 2026 06:28
@pregnantboy pregnantboy changed the base branch from graphite-base/1451 to develop-v2 March 10, 2026 06:29
@pregnantboy pregnantboy force-pushed the tiles-password/mutation-endpoints branch from 72f6acf to d78ea2d Compare March 10, 2026 06:30
@pregnantboy pregnantboy merged commit 6f47789 into develop-v2 Mar 10, 2026
7 checks passed
@pregnantboy pregnantboy deleted the tiles-password/mutation-endpoints branch March 10, 2026 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants