I know the GraphQL api is still a work in progress, but I am curious if it will have the shortest path functionality that the GraphQL +/- query language has?
In the meantime, is there a way that I can the uid of particular nodes via the GraphQL API so that I can use those uids in the path function? For example if I have a type:
# name is an id to make it globally unique,
# so there is only 1 name and 1 uid combination.
# if there is a better way of doing this please let me know.
type Entity {
name: String @id
...properties
}
The GraphQL API would expose a queryEntity query function, and it seems that Dgraph assigns a node a uid. However, I cannot seem to pull off the uid property from the queryEntity query.
query {
queryEntity() {
name
uid # <-- causes an error as it is not a property on type Entity.
}
}
I can use the GraphQL +/- queries to get the uid’s then pipe those into the shortest path function, but I am curious if that internal node uid will be exposed via GraphQL? or Maybe I am setting up the types inccorectly? Thank you!