Finding All Resources In Grakn

121 views Asked by At

I have created the following simple schema:

insert
name sub resource datatype string;
id sub resource datatype string;
person sub entity has name has id;

and data:

insert
$x isa person has name "Bob" has id bob;

How can I get all the resources I have attached to an entity? Do I have to iterate over all of them?

1

There are 1 answers

0
Filipe Teixeira On BEST ANSWER

You can get all the resources by querying the root resource like so:

match $x has resource $y;