Insert in multiple graph does not work with default graph

I was able to do the following

INSERT {
    GRAPH asset:test { ?terminal1 asset:ReadsFrom ?terminal2 } 
    GRAPH asset:meta { ?circuit2 asset:ReadsFrom ?circuit1 }
} WHERE { ... }

and it works as expected, however if I try the following

INSERT {
    ?terminal1 asset:ReadsFrom ?terminal2  
    GRAPH asset:meta { ?circuit2 asset:ReadsFrom ?circuit1 }
} WHERE { ... }

only the circuit triple get added,

if I try the following

INSERT {
    GRAPH asset:meta { ?circuit2 asset:ReadsFrom ?circuit1 }
   ?terminal1 asset:ReadsFrom ?terminal2  
} WHERE { ... }

both triple get inserted in the GRAPH asset:meta.

Hi Serge,

We can take a look into this; in the meantime try explicitly adding GRAPH <tag:stardog:api:context:default> around the triples you want inserted into the default graph.

The documentation explicitly state that <tag:stardog:api:context:default> is for read-only purpose. I think I tried, and I got an error.

So it is read-only. My apologies! I have created a ticket for us to look further into this issue, as it appears that even in your first case it doesn't quite work as expected. In my testing both of the triples were put into their respective graphs, but also into the default graph.

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