Skip to content

SPARQL endpoint enhancements: named graph support and query history #23

@JohnRDOrazio

Description

@JohnRDOrazio

Summary

The SPARQL endpoint (POST /api/v1/search/sparql) is fully functional for read-only queries (SELECT, ASK, CONSTRUCT, DESCRIBE). This issue tracks enhancements to support the upcoming frontend SPARQL query explorer.

Enhancements

1. Named graph / default graph support

The default_graph field in SPARQLQuery is currently unused (already noted in sparql-ontology-loading.md). Implement support for:

  • Specifying a default graph URI
  • Querying across named graphs when multiple ontology files exist in a project

2. Query history (optional)

  • Store recent queries per user per project for easy re-execution from the frontend
  • Could be a simple PostgreSQL table or Redis cache

Context

The frontend SPARQL query explorer will consume this endpoint. The current endpoint is production-ready for the initial UI — these are follow-up enhancements.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions