-
Notifications
You must be signed in to change notification settings - Fork 22
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
return @type instead of rdf:type #553
Conversation
Also updated dev namespaces, source code comments, and function docstrings.
ed5137c
to
58acde3
Compare
@@ -68,7 +68,7 @@ | |||
|
|||
@(fluree/query (fluree/db ledger) | |||
{:select {'?s [:* {:schema/isBasedOn [:*]}]} | |||
:where [['?s :rdf/type :schema/Movie]]}) | |||
:where [['?s :type :schema/Movie]]}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rdf:type
or @type
should work the same for a query - so these shouldn't need changing, but it shouldn't hurt to to change them either.
It is in the responses, when doing a graph crawl specifically, that we should default to returning @type
instead of defaulting to rdf:type
.
SPARQL will parse near directly into FlureeQL, and @type doesn't exist in SPARQL... so we don't want to loose rdf:type. SPARQL does not support a graph crawl response, which is where we are in unique Fluree land... and that is why it makes sense to change the default behavior there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, I've added an explicit test that shows the following:
- you cannot transact with an
rdf:type
predicate - you can query with an
rdf:type
predicate and it behaves the same as using@type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🍍
Fixes #551
Uses the json-ld
@type
keyword instead of the rdfhttp://www.w3.org/1999/02/22-rdf-syntax-ns#type
IRI.Also fixes #537 by throwing an error during insert if it comes across the
rdf:type
IRI.