Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IRI Rewriting in SPARQL Result Set Can Lead to Confusing Results #168

Closed
ktk opened this issue Aug 24, 2023 · 3 comments
Closed

IRI Rewriting in SPARQL Result Set Can Lead to Confusing Results #168

ktk opened this issue Aug 24, 2023 · 3 comments
Assignees

Comments

@ktk
Copy link
Member

ktk commented Aug 24, 2023

When an IRI matches the pattern specified by -dataset-base-url, it undergoes a rewrite in the SPARQL result set. This is observed:

  • In the Yasgui display.
  • In plain (raw) result sets.

I've confirmed this behavior for SELECT statements, though I haven't tested it with CONSTRUCT statements.

Problem:
Such rewriting can:

  • Produce confusing results for end-users.
  • Potentially disrupt applications or services that consume the response.

Original Intent:
The primary reason for implementing this rewrite feature was to facilitate easier "follow your nose" browsing, especially in a test environment.

Suggestion:
Considering its initial intent, it might be best if this rewrite function was limited to dereferencing actions only. It shouldn't apply to result sets or triples returned from the SPARQL endpoint.

@ludovicm67 ludovicm67 self-assigned this Aug 25, 2023
@l00mi
Copy link
Contributor

l00mi commented Aug 25, 2023

As mentioned per PM, I think #119 is the better, more sustainable solution. It would allow to dereference on PROD, but using the other environments.

@ludovicm67
Copy link
Member

I was thinking of having a parameter on the sparql-proxy, to allow rewriting.

That way by default it does not rewrite anything, but if you add ?rewrite=true to the endpoint, you will get the rewritten responses, as it is also sometime useful while playing with data, and being able to directly dereference results.

The renderer for the pages will query the endpoint by providing that parameter, so that it works directly for dereferencing, like before.

This would be the easiest way to tackle this.

@ludovicm67
Copy link
Member

Done using the rewrite=true query parameter in the endpoint created by the sparql-proxy plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants