Skip to content

Extending/adding entities #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ type Post @entity{
pubId: ID! #publicationId
contentURI: String! #content
collectModule: Bytes! #collect address
collectModuleReturn: Bytes! #cm init data
referenceModule: Bytes! #rm address
referenceModuleReturn: Bytes! #abi encoded reference
creationTime: Int! #timestamp
comments: [Comment!] @derivedFrom(field: "postPointed")
}

type Comment @entity{
Expand All @@ -19,9 +21,12 @@ type Comment @entity{
contentURI: String! #content
profileIdPointed: ID! #pointedId
pubIdPointed: ID! #pointed pub
collectModule: Bytes! #cm address
collectModuleReturn: Bytes! #cm init data
referenceModule: Bytes! #rm address
referenceModuleReturn: Bytes! #abi encoded reference
creationTime: Int! #timestamp
postPointed: Post!
}

type Mirror @entity{
Expand All @@ -33,4 +38,41 @@ type Mirror @entity{
referenceModule: Bytes! #rm address
referenceModuleReturn: Bytes! #abi encoded reference
creationTime: Int! #timestamp
}

type Profile @entity {
id: ID! #tokenId
creator: Bytes! #address which created the token with given Id
owner: Bytes! # address to which profile Id is minted
handle: String! #handle/username
imageURI: String! #profile picture
followNFTURI: String! #uri set on creation
createdOn: BigInt! #timestamp
followModule: Bytes! #fm address
followModuleReturnData: Bytes! #abi encoded reference
dispatcher: Bytes!
}

type ProfileCreatorWhitelisted @entity {
id: ID! #creator address
isWhitelisted: Boolean! #creator whitelisted/removed
creationTime: Int! #timestamp
}

type FollowModuleWhitelist @entity {
id: ID! #module address
isWhitelisted: Boolean! #module created/removed
creationTime: Int! #timestamp
}

type ReferenceModuleWhitelist @entity {
id: ID! #module address
isWhitelisted: Boolean! #module created/removed
creationTime: Int! #timestamp
}

type CollectModuleWhitelist @entity {
id: ID! #module address
isWhitelisted: Boolean! #module created/removed
creationTime: Int! #timestamp
}