cayley icon indicating copy to clipboard operation
cayley copied to clipboard

Read API match Literals expects bare strings instead of N3

Open iddan opened this issue 6 years ago • 2 comments

Description Read API match parameters are described to be n3 but for literals only bare string notation works.

Steps to reproduce the issue:

  1. Query with obj="value" doesn't work
  2. Query with obj=value works

Output of cayley version or commit hash:

Cayley version: v0.7.x-dev
Git commit hash: b9dabbed3f75

Environment details:

Backend database: memory

iddan avatar Jul 09 '19 08:07 iddan

This is tricky, to be honest. We don't know what format the user sends us. It's ambiguous if we see a quoted value like "A". Is it in N-Quad syntax? Or is it literally a text with quotes inside (\"A\")?

Maybe the best solution would be to add a new /v3/read endpoint and state that all values should be either in JSON-LD syntax or in N-Quad syntax.

dennwc avatar Sep 23 '19 02:09 dennwc

We can also make a breaking change to /v2/read, it's a relatively new API I'm guessing not a lot of people are using by far.

iddan avatar Sep 23 '19 07:09 iddan