Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # pho-graphql-v1.1
- type Facebook implements GraphNode
- @permissions(mod: "0x0f751", mask: "0xfffff") # people outside can't read.
- {
- id: ID,
- founder: User!
- type User implements ActorNode
- @edges(
- in:"User:Follow, StatusUpdate:Mention, Edges:Consume, Edges:Message",
- out:"Post, React, Comment, Consume, Message, Create, Follow"
- )
- @permissions(mod: "0x07554", mask: "0xfffff") # user themselves, can manage, members can subscribe, outsiders can just read.
- @properties(editable: false, volatile: false, revisionable: false)
- {
- id: ID!,
- username: String! @unique @constraints(regex: "/^[_[a-z0-9]]{1,18}$/"),
- password: String! @md5 @constraints(regex: "/^[a-zA-Z0-9_]{4,12}$/"),
- join_time: Date! @now
- birthday: Date @default(String: "01/15/1983"),
- about: String @constraints(maxLength: 255,) @default(String: ""),
- }
- type Photo implements ObjectNode
- @edges(in:"Edges:Post, Edges:React, Edges:Comment, Edges:Consume")
- @permissions(mod: "0x07500", mask: "0xfffff") # owner can write, friends can read and like (subscribe)
- @properties(expires: 0, editable: false, volatile: false, revisionable: false)
- {
- id: ID!,
- url: String! @constraints(format: "url"),
- create_time: Date! @now
- }
- }
Add Comment
Please, Sign In to add comment