Do we have any more examples of making a complex schema's in pydgraph?

Hi,

I am learning dgraph and it looks appealing to me. Right now what I want is to make a schema of a system like for different social media platforms having the individual nodes of each user (with details of user) for each of these platforms. Make relations schema also between the users nodes.
The documentation of the dgraph contains basic examples about the “set” schema. Are there any sources about handling complex schema’s just like the above?

You can check GitHub - dgraph-io/flock: Twitter on Dgraph and GitHub - dgraph-io/graphoverflow: Run the entire StackOverflow on Dgraph. Work in progress.
They are examples of social relationships - or social related. Sorry no py examples.

1 Like

I want to categorize different social platforms details like

type Facebook {
name: string @index(exact) .
id: string @index(exact) .
profile: string @index(exact) .
picture_link: string .
status_count: int .
tags: string .
type : string .
label: string @index(exact) .
}

type Twitter{
name: string @index(exact) .
id: string @index(exact) .
profile: string @index(exact) .
picture_link: string .
status_count: int .
tags: string .
type : string .
}

Considering facebook, what i basically want is that the label key will tell me about the fb label (fb group, fb user, fb page, user_friend etc ) and then i will have relations here among the nodes
relations examples:

likes :{
page_name: string @index(exact) .
page_id: string @index(exact) .
page_profile: string @index(exact) .
page_picture_link: string .
}

member_of:{
group_name: string @index(exact) .
group_id: string @index(exact) .
group_profile: string @index(exact) .
group_picture_link: string .
}
e.g which fb_user ‘likes’ which page or a fb_user is ‘member’ of the fb_group etc

Similar case of twitter, e.g the user ‘follows’ 2nd_user, and so on vice versa

Please guide me a i am just moving from neo4j to dgraph and having trouble in writing schema. I hope so you basically get my point plus let me know how the relations will adjust in the above scenario.

Looking forward to hear.
Thanks