Skip to content

SPARQL Protocol: bind $name parameters on the update endpoints #2480

Open

Description

@bplatz

Problem

#2475 lets a SPARQL query bind variables over HTTP for one request: one $name parameter per variable, whose value is an RDF term ($name="Alice", $s=<http://ex.org/a>), read from the URL or a form-encoded body. The update endpoints don't bind them. They refuse them with a 400, because ignoring a binding would leave the variable unbound and widen the match: DELETE WHERE { ?s ex:name $name } sent with $name="A" would delete every name.

The embedded API already binds update parameters (sparql_update_with_params on the transaction builders, substituted in tx_builder.rs). Over HTTP, a client has to splice values into the update text instead. Other SPARQL servers that use the $name convention bind it on their update endpoints too.

Proposal

Accept $name bindings on the SPARQL Update endpoints the way the query routes do:

  • Read them from the same places (the URL, or a form-encoded body), each variable at most once.
  • Convert each value with fluree_db_sparql::param_from_term and substitute through the embedded API's update parameter path.
  • Keep the query routes' refusals: a value that isn't one full RDF term, an unknown name, or a self-assigned variable is a 400.

Scope

  • Update endpoints: the ledger and connection SPARQL Update routes, with the transports the query routes support.
  • Tests: an update with a binding changes only the bound match (a DELETE WHERE deletes one name, not all), and the refusals stay 400s with nothing committed.
  • Docs: the binding paragraph in docs/api/endpoints.md and the SPARQL Parameters section stop calling updates a refusal.

Activity

  1. added
    enhancement
    P3
    area:server
    on Nov 21, 2026
  2. changed the title [-]SPARQL Protocol: bind params on the update endpoints[/-] [+]SPARQL Protocol: bind $name parameters on the update endpoints[/+] on Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3area:serverenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions