Skip to content
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

fix: makes Permissions in Subgraph mutable. #335

Merged
merged 2 commits into from
Mar 23, 2023
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions packages/subgraph/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Changed `IPluginInstallation` to `IPlugin`.
- Changed `release: Int!` to `release: PluginRelease!` in `PluginVersion`
- Changed `versions` to `releases` in `PluginRepo`.
- Changes `Permission` entity to be muteable.

### Removed

Expand Down
4 changes: 3 additions & 1 deletion packages/subgraph/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ type ContractPermissionId @entity(immutable: true) {
permissionId: Bytes!
}

type Permission @entity(immutable: true) {
# Cannot be immutable because a permission can be revoked and granted in the same TX.
# This results in an error in the subgraph if the entity is immutable.
type Permission @entity {
"no need to store granted as we can delete permission when revoked"
id: ID! # where + permissionId + who
dao: Dao!
Expand Down