Skip to content

Commit

Permalink
fix: update schema inline comments to reflect ID handling
Browse files Browse the repository at this point in the history
  • Loading branch information
banasa44 committed Apr 9, 2024
1 parent f0fb7fd commit 77fba4d
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions packages/subgraph/schema.graphql
Original file line number Diff line number Diff line change
@@ -1,33 +1,47 @@
interface IPlugin {
id: ID! # PluginEntityID
id: ID! # Plugin Address
daoAddress: Bytes!
pluginAddress: Bytes!
}

type AdminPlugin implements IPlugin @entity {
id: ID! # plugin address
id: ID! # Plugin Address
daoAddress: Bytes!
pluginAddress: Bytes!
proposals: [AdminProposal!]! @derivedFrom(field: "plugin")
administrators: [AdministratorAdminPlugin!]! @derivedFrom(field: "plugin")
}

type Administrator @entity(immutable: true) {
id: ID! # address
id: ID! # Administrator Address
address: String # address as string to facilitate filtering by address on the UI
proposals: [AdminProposal!]! @derivedFrom(field: "administrator")
plugins: [AdministratorAdminPlugin!]! @derivedFrom(field: "administrator")
}

type AdministratorAdminPlugin @entity {
"for Many-to-Many"
id: ID! # Administrator + plugin
id: ID! # Plugin Address + Administrator Address
administrator: Administrator!
plugin: AdminPlugin!
}

interface IProposal {
id: ID! # Plugin Address + proposalId
daoAddress: Bytes!
creator: Bytes!
metadata: String
actions: [Action!]! @derivedFrom(field: "proposal")
allowFailureMap: BigInt!
executed: Boolean!
createdAt: BigInt!
startDate: BigInt!
endDate: BigInt!
executionTxHash: Bytes
}

type AdminProposal implements IProposal @entity {
id: ID! # plugin + proposalId
id: ID! # Plugin Address + proposalId
daoAddress: Bytes!
creator: Bytes! # Administrator address
metadata: String
Expand All @@ -44,15 +58,15 @@ type AdminProposal implements IProposal @entity {
}

interface IAction {
id: ID! # ActionEntityId
id: ID! # Plugin Address + DAO Address + Plugin Proposal ID + action idx
to: Bytes!
value: BigInt!
data: Bytes!
daoAddress: Bytes!
}

type Action implements IAction @entity(immutable: true) {
id: ID! # ActionEntityId
id: ID! # Plugin Address + DAO Address + Plugin Proposal ID + action idx
to: Bytes!
value: BigInt!
data: Bytes!
Expand All @@ -61,17 +75,3 @@ type Action implements IAction @entity(immutable: true) {
# proposal data
proposal: IProposal!
}

interface IProposal {
id: ID! # ProposalEntityId
daoAddress: Bytes!
creator: Bytes!
metadata: String
actions: [Action!]! @derivedFrom(field: "proposal")
allowFailureMap: BigInt!
executed: Boolean!
createdAt: BigInt!
startDate: BigInt!
endDate: BigInt!
executionTxHash: Bytes
}

0 comments on commit 77fba4d

Please sign in to comment.