Help with Simple Bill Of Materials

I would like some help to set up a simple Bill Of Materials Please. I’m really new to this so please bear with me.

First the parts. Each part has two fields
part.number
part.description

Then I would define the parent/child relationships by creating an edge between two parts. Something like:
P1 child P2
P1 child P3

So P1 is an assembly of two parts, P2 and P3

Each child would also require child.index that would determine the order of the children.

When that is done I would require a query that would return all the parts below the “root” part P1 in the correct order.

These are not terribly complicated relationships, but unfortunately I can’t make any sense of the docs. If It would really help me out if someone could provide the mutations to make the three parts and one assembly in my example.

Many thanks.

Hi Roland,

Okay, If you’re new I recommend you to try out our Tour first: http://tour.dgraph.io
You can also see this video https://youtu.be/vhatoyZ2vic in this video you have a kind of guide to a “CRUD” procedure in Dgraph. I think you can understand better and fast from this video. But you also needs to learn GraphQL +- . And for that the Tour can help you.

However, from what you have described in your text, I believe you will need a Recursive Query.

I think is best for you to engage in a learning journey than I just try to understand your context and give you just an answer. This would be bad for a good learning curve for those who are starting.

BTW, I’m here to help you in that journey. But to help you, you need to help me. If the video and the Tour don’t help I need you to share your experience. I understand that is hard to learn from documentation(And that’s not the purpose of it), but we have those material i’ve mentioned tho. Once you have the very basics, our communication can flow better.

Cheers.