Query data with predicates of the form http://

Hi, I first loaded data of the form

curl localhost:8080/query -XPOST -d $‘mutation {
set {
http://example.com http://example.com#type http://example.com/mytype .
}
}’

Now I tried to query the data with

curl localhost:8080/query -XPOST -d '{
 debug(_xid_: http://example.com) {
 http://example.com#type
	}
}'

but go the error

{“code”:“ErrorInvalidRequest”,“message”:“Unrecognized character in lexInside: U+003A ‘:’”}

Do I have a POST-encoding issue?

Thank you

Colons aren’t allowed in the predicate names. I think just stripping http:// from all predicates should fix this issue.

Alright I see.

I perfectly understand that a graph database is not the same as a triple store. But as you accept N-Triples / N-Quads as input this restriction is not obvious. As DGraph is in it’s early stage and very much in flux I understand shortcomings as the project/product get’s advanced but may I suggest to lift this restriction for the future?

I am investigating graph databases for a research project and unfortunately effectively disallowing URIs/IRIs as predicates is currently a showstopper for me.

1 Like

Agreed. I think we should support RDF format as per the spec. Feel free to file a bug against Dgraph.

Done DGraph has to support IRIs for queries as by the spec · Issue #347 · dgraph-io/dgraph · GitHub

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.