I am beginner with dgraph and shifting from neo4j to dgraph. I am writing schema where I have different social media platforms details.
Considering facebook, the schema will have basic details of the profile,groups,pages plus different relations between the fb profiles and groups and pages like
profile_a is 'friends_of' profile_b;
user 'likes' page_b;
user is 'member_of' group_a
user 'works_at' place_a
Similar case for twitter where the relations will be
twitter_user 'follows' user_a
user_a 'followed_by' users
What I have done so for
type Person{
name: string @index(exact) .
id: string @index(exact) .
profile: string @index(exact) .
picture_link: string .
status_count: int .
location: string .
tags: string .
user_id: int .
follower_count: string .
friend_count: string .
type: int @index(exact) .
likes : [Page] .
friends_of : [Fb_User] .
members_of : [Group] .
works_at : {
name: string .
}
}
type Fb_User{
name: string @index(exact) .
id: string @index(exact) .
profile: string @index(exact) .
picture_link: string .
status_count: int .
location: string .
type: int @index(exact) .
location: string .
tags: string .
user_id: int .
}
type Group{
name: string @index(exact) .
id: string @index(exact) .
profile: string @index(exact) .
picture_link: string .
group_member : int .
}
type Page{
name: string @index(exact) .
id: string @index(exact) .
profile: string @index(exact) .
picture_link: string .
page_type : int .
}
type Facebook
{
label: string @index(exact)
}
Kindly guide and correct me about schema structure. Looking forward to implement it in pydgraph
Thanks
Got help from https://tour.dgraph.io/schema/1/
I expect a schema that will accept the basic details and relations via python code