The graphs that you see when you query over the default graph and named graphs are controlled by different clauses. You use FROM for the former and FROM NAMED for the latter.
You want:
select *
from named <tag:stardog:api:context:all>
{ graph ?g { ?s ?p ?o } }
or even simply:
select *
{ graph ?g { ?s ?p ?o } }
because the default dataset when no FROM or FROM NAMED is specified is equivalent to:
select *
from <tag:stardog:api:context:default>
from named <tag:stardog:api:context:all>
{ graph ?g { ?s ?p ?o } }