Skip to content

Normalize graphql plugin secret/connection refs#518

Closed
RhysSullivan wants to merge 1 commit intors/normalize-secret-refsfrom
rs/normalize-graphql
Closed

Normalize graphql plugin secret/connection refs#518
RhysSullivan wants to merge 1 commit intors/normalize-secret-refsfrom
rs/normalize-graphql

Conversation

@RhysSullivan
Copy link
Copy Markdown
Owner

Move secret/connection references out of the JSON columns on
graphql_source (auth, headers, query_params) into:

  • two new flat columns auth_kind + auth_connection_id (indexed)
  • two child tables graphql_source_header / graphql_source_query_param,
    each with kind/text_value/secret_id/secret_prefix and an indexed
    secret_id

This lets usagesForSecret and usagesForConnection answer "where is X
referenced?" with a single indexed SELECT instead of scanning JSON, and
secrets.remove / connections.remove now correctly RESTRICT when a
graphql source still references the id.

Migration 0007 backfills existing JSON via json_each + json_extract,
then drops the old columns. Three tests cover the backfill against a
hand-seeded pre-migration DB; three plugin-level tests cover usage
fan-out and remove RESTRICT.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 4, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
executor-marketing 57a1a41 Commit Preview URL

Branch Preview URL
May 05 2026, 06:26 PM

Copy link
Copy Markdown
Owner Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 4, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
executor-cloud 57a1a41 May 05 2026, 06:28 PM

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 4, 2026

Open in StackBlitz

@executor-js/cli

npm i https://pkg.pr.new/@executor-js/cli@518

@executor-js/config

npm i https://pkg.pr.new/@executor-js/config@518

@executor-js/execution

npm i https://pkg.pr.new/@executor-js/execution@518

@executor-js/sdk

npm i https://pkg.pr.new/@executor-js/sdk@518

@executor-js/storage-core

npm i https://pkg.pr.new/@executor-js/storage-core@518

@executor-js/codemode-core

npm i https://pkg.pr.new/@executor-js/codemode-core@518

@executor-js/runtime-quickjs

npm i https://pkg.pr.new/@executor-js/runtime-quickjs@518

@executor-js/plugin-file-secrets

npm i https://pkg.pr.new/@executor-js/plugin-file-secrets@518

@executor-js/plugin-google-discovery

npm i https://pkg.pr.new/@executor-js/plugin-google-discovery@518

@executor-js/plugin-graphql

npm i https://pkg.pr.new/@executor-js/plugin-graphql@518

@executor-js/plugin-keychain

npm i https://pkg.pr.new/@executor-js/plugin-keychain@518

@executor-js/plugin-mcp

npm i https://pkg.pr.new/@executor-js/plugin-mcp@518

@executor-js/plugin-onepassword

npm i https://pkg.pr.new/@executor-js/plugin-onepassword@518

@executor-js/plugin-openapi

npm i https://pkg.pr.new/@executor-js/plugin-openapi@518

executor

npm i https://pkg.pr.new/executor@518

commit: 57a1a41

@RhysSullivan RhysSullivan force-pushed the rs/normalize-secret-refs branch from e0a2079 to d488f51 Compare May 4, 2026 19:50
@RhysSullivan RhysSullivan force-pushed the rs/normalize-graphql branch from fc4e787 to 8df7c7b Compare May 4, 2026 19:50
@RhysSullivan RhysSullivan force-pushed the rs/normalize-secret-refs branch from d488f51 to 933fac9 Compare May 5, 2026 18:10
@RhysSullivan RhysSullivan force-pushed the rs/normalize-graphql branch from 8df7c7b to 2e41ee2 Compare May 5, 2026 18:10
Move secret/connection references out of the JSON columns on
graphql_source (auth, headers, query_params) into:
- two new flat columns auth_kind + auth_connection_id (indexed)
- two child tables graphql_source_header / graphql_source_query_param,
  each with kind/text_value/secret_id/secret_prefix and an indexed
  secret_id

This lets usagesForSecret and usagesForConnection answer "where is X
referenced?" with a single indexed SELECT instead of scanning JSON, and
secrets.remove / connections.remove now correctly RESTRICT when a
graphql source still references the id.

Migration 0007 backfills existing JSON via json_each + json_extract,
then drops the old columns. Three tests cover the backfill against a
hand-seeded pre-migration DB; three plugin-level tests cover usage
fan-out and remove RESTRICT.
@RhysSullivan RhysSullivan force-pushed the rs/normalize-secret-refs branch from 933fac9 to cea63e9 Compare May 5, 2026 18:25
@RhysSullivan RhysSullivan force-pushed the rs/normalize-graphql branch from 2e41ee2 to 57a1a41 Compare May 5, 2026 18:25
@RhysSullivan RhysSullivan marked this pull request as ready for review May 5, 2026 18:32
@RhysSullivan
Copy link
Copy Markdown
Owner Author

Consolidated into #521

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.

1 participant