pawan
(Pawan Rawal)
1
I was reading up the code which lexes and parses N-Quads to solve the issue.
What we do is that if the elements of the quad(Subject, Object, Predicate, Label) are not an IRI / Literal / Blank node we ignore them.
In all of the below mutations that John mentions here
-
mutation{ set { <alice> <follows> <bob> quad . }}
-
mutation{ set { <alice> <follows> <bob> quad pentagon . }}
-
mutation{ set { <alice> <follows> <bob> quad pentagon . hexagonafterdot}}
Label is not set or even lexed because it’s not an IRI or a Blank node. Basically, any part of input which doesn’t start with <
, "
or ‘_’ isn’t lexed.
So even mutation { set { <alice> lol <follows> <bob> . }}
would ignore the lol and set the S, O and P.
A solution here would be probably to throw an error if we see something which is not a IRI/Blank Node or a Literal. Thoughts @mrjn?
mrjn
(Manish R Jain)
2
Throwing an error sounds like a good idea. Just confirm with the RDF spec that it’s the right thing to do.
pawan
(Pawan Rawal)
Closed
3
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.