Skip to content

[FEATURE] Support GraphQL-backed INSERT/UPDATE/DELETE/EXEC via omnisdk #763

Open

Description

@jeffreyaven

Upstream dependencies

Keep this issue open until the relevant upstream changes are available, any required StackQL integration is complete, and the acceptance checks here pass. Upstream issue closure alone is not sufficient. Current execution work targets omnisdk. The legacy design is stackql/any-sdk#142; its successor is omnisdk #43.

Summary

Priority: HIGH
Effort: HIGH

Historical design reference: stackql/any-sdk#142. Active dependencies are listed above.

Once omnisdk #43 supplies GraphQL mutations (operationType: mutation, variables payloads, errorSelection), stackql should execute mutating SQL verbs against GraphQL-backed provider methods. The pinned omnisdk GraphQL document model does not expose operationType, typed variables or errorSelection; a complete SQL mutation route must be established against the new SDK contract. This keeps every GraphQL-backed provider (gitlab, newrelic, buildkite, and the planned runpod and railway) read-only by engine constraint.

Scope

  1. Verb routing: when a resolved method carries a GraphQL block with operationType: mutation, route INSERT/UPDATE/DELETE/EXEC through omnisdk's one-shot GraphQL mutation executor rather than the REST HTTP payload path. sqlVerbs wiring in provider docs works unchanged - the method $ref mechanism is protocol-agnostic already.
  2. Parameter binding: SQL-supplied values (INSERT column/value lists, @-params on EXEC, WHERE-bound required params) feed the method's declared parameters, which omnisdk renders into the variables payload. Required-parameter validation and overloaded-verb signature resolution behave identically to REST methods.
  3. Result semantics:
    • success: responseSelection projection returned as the statement result (INSERT/EXEC result rows where the payload selects an object), consistent with REST mutation result handling.
    • failure: an omnisdk errorSelection hit (or top-level GraphQL errors on HTTP 200) surfaces as a statement error carrying the selected error content - never as an empty success and never as rows.
  4. SHOW METHODS / DESCRIBE: mutation-backed methods present identically to REST-backed ones (no protocol leakage into the SQL surface).
  5. --http.log.enabled: mutation requests and raw responses use the current omnisdk HTTP observer and StackQL logging adapter, matching REST logging behaviour.

Reference implementation and acceptance

gitlab v2 is the canonical reference provider for this feature (strict Relay conventions: single input object argument, errors: [] payloads in HTTP 200, free full-lifecycle CI via the gitlab-ce container). Acceptance is demonstrated against it:

  • INSERT INTO gitlab.issues.issues ... executes createIssue with a variables payload and returns the created issue projection.
  • An update mutation (label or issue state) executes via UPDATE/EXEC per the provider's mapping.
  • DELETE executes the corresponding destroy mutation.
  • A negative test: a mutation returning a populated errors array in a 200 fails the statement with the error content surfaced.
  • A regression test: existing GraphQL SELECTs (gitlab list resources) are byte-identical in behaviour.
  • Registry docs: the gitlab provider's sqlVerbs.insert/update/delete populated for the piloted resources; no other provider docs change.

Downstream (not in this issue)

  • Mutation generation rules in @stackql/provider-utils (deriving mutation methods and variables skeletons from introspection - the gitlab generator grows a map_mutations stage).
  • Provider builds unlocked by this feature: runpod (pod lifecycle), railway (deploys), newrelic NerdGraph and buildkite write phases.

Activity

  1. self-assigned this
    on Sep 14, 2026
  2. changed the title [-][FEATURE] support GraphQL-backed INSERT/UPDATE/DELETE/EXEC via any-sdk GraphQL mutation support[/-] [+][FEATURE] Support GraphQL-backed INSERT/UPDATE/DELETE/EXEC via omnisdk[/+] on Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions