Skip to content

Conversation

@wobsoriano
Copy link
Contributor

@wobsoriano wobsoriano commented Dec 23, 2025

What kind of change does this PR introduce?

  1. Adds INSERT, UPDATE, and DELETE support to Clerk FDW for supported endpoints
  2. Adds single-item retrieval by ID support (ID pushdown)

What is the current behavior?

  • Clerk FDW only supports SELECT. INSERT, UPDATE, and DELETE return errors or no-ops.
  • Querying a specific resource by ID fetches all records and filters locally.

What is the new behavior?

  • Full CRUD: users, organizations, jwt_templates, oauth_applications, saml_connections
  • Insert + Delete: allowlist_identifiers, blocklist_identifiers, redirect_urls
  • Insert only: invitations
  • Update + Delete: domains
  • ID Pushdown - users, organizations, jwt_templates, oauth_applications, saml_connections, redirect_urls

Additional context

  • Follows Orb FDW patterns (structure) and Paddle FDW patterns (PATCH for updates)
  • Documentation updated to reflect CRUD support and retrieve-by-ID notes

@wobsoriano wobsoriano marked this pull request as ready for review December 23, 2025 17:38
Copilot AI review requested due to automatic review settings December 23, 2025 17:38
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds CRUD (Create, Read, Update, Delete) functionality to the Clerk Foreign Data Wrapper, extending it beyond read-only SELECT operations to support data modification operations.

Key Changes:

  • Implemented INSERT, UPDATE, and DELETE operations using HTTP POST, PATCH, and DELETE methods respectively
  • Added rowid_column 'id' option to all table definitions to enable row identification for updates and deletes
  • Updated documentation to reflect new CRUD capabilities for each supported object type

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
wasm-wrappers/fdw/clerk_fdw/src/lib.rs Implements begin_modify, insert, update, and delete functions with HTTP request handling for various Clerk API endpoints; adds rowid_column option to all table definitions
docs/catalog/clerk.md Updates operation support tables to show INSERT/UPDATE/DELETE capabilities per object type; adds data modification examples demonstrating CRUD operations

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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