I am trying store deeply nested JSOn objects (in my case these are Kubernetes YAMLs) like tasty-kube/busy-dep.yaml at master · appscodelabs/tasty-kube · GitHub in dgraph and run search on them. For example, I want to list metdata.name of all kind: Deployment that uses spec.template.spec.containers[*],name == busybox .
I am new to dgraph. Can you please help me understand how something like this can be accomplished?
Dgraph supports two ways for mutation, the rdf way and the json way. You can opt any one of them. If you have a nested JSON, you can straight away use it in the mutation and dgraph will figure out the schema accordingly.
An example mutation for your use case would be something like below: