Skip to content

Parse error when query result contains quads (named graphs) in the output #1642

Description

@opl-
import { n3reasoner } from 'eyereasoner';

await n3reasoner(
	'<http://dbpedia.org/resource/Belgium> <http://dbpedia.org/ontology/PopulatedPlace/areaTotal> "30528.189856530433"^^<http://dbpedia.org/datatype/squareKilometre> <http://example.com/graph>.',
	'{ ?s ?p ?o ?g } => { ?s ?p ?o ?g }.',
	{
		outputType: 'quads',
	},
);

Throws the following error:

Error: Error while parsing query result: [Error: Expected punctuation to follow ""30528.189856530433"^^http://dbpedia.org/datatype/squareKilometre" on line 1.]. Query result: [<http://dbpedia.org/resource/Belgium> <http://dbpedia.org/ontology/PopulatedPlace/areaTotal> "30528.189856530433"^^<http://dbpedia.org/datatype/squareKilometre> <http://example.com/graph>.

This appears to be caused by the Parser from the n3 package throwing when a graph name is present in the output. I'm not sure if this is a parser bug, eye-js passing the wrong format when configuring the parser, or EYE returning data in an invalid format.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions