@powerhousedao/vetra-builder-package 0.0.31 → 0.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/editors/builder-team-editor/config.js +10 -8
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/document-models/builder-account/gen/actions.d.ts +0 -9
- package/dist/document-models/builder-account/gen/actions.js +0 -4
- package/dist/document-models/builder-account/gen/creators.d.ts +0 -4
- package/dist/document-models/builder-account/gen/creators.js +0 -4
- package/dist/document-models/builder-account/gen/document-model.d.ts +0 -2
- package/dist/document-models/builder-account/gen/document-model.js +0 -253
- package/dist/document-models/builder-account/gen/index.d.ts +0 -7
- package/dist/document-models/builder-account/gen/index.js +0 -6
- package/dist/document-models/builder-account/gen/members/actions.d.ts +0 -11
- package/dist/document-models/builder-account/gen/members/actions.js +0 -1
- package/dist/document-models/builder-account/gen/members/creators.d.ts +0 -4
- package/dist/document-models/builder-account/gen/members/creators.js +0 -4
- package/dist/document-models/builder-account/gen/members/error.d.ts +0 -1
- package/dist/document-models/builder-account/gen/members/error.js +0 -1
- package/dist/document-models/builder-account/gen/members/object.d.ts +0 -7
- package/dist/document-models/builder-account/gen/members/object.js +0 -10
- package/dist/document-models/builder-account/gen/members/operations.d.ts +0 -7
- package/dist/document-models/builder-account/gen/members/operations.js +0 -1
- package/dist/document-models/builder-account/gen/object.d.ts +0 -20
- package/dist/document-models/builder-account/gen/object.js +0 -36
- package/dist/document-models/builder-account/gen/packages/actions.d.ts +0 -23
- package/dist/document-models/builder-account/gen/packages/actions.js +0 -1
- package/dist/document-models/builder-account/gen/packages/creators.d.ts +0 -7
- package/dist/document-models/builder-account/gen/packages/creators.js +0 -7
- package/dist/document-models/builder-account/gen/packages/error.d.ts +0 -1
- package/dist/document-models/builder-account/gen/packages/error.js +0 -1
- package/dist/document-models/builder-account/gen/packages/object.d.ts +0 -10
- package/dist/document-models/builder-account/gen/packages/object.js +0 -19
- package/dist/document-models/builder-account/gen/packages/operations.d.ts +0 -10
- package/dist/document-models/builder-account/gen/packages/operations.js +0 -1
- package/dist/document-models/builder-account/gen/ph-factories.d.ts +0 -26
- package/dist/document-models/builder-account/gen/ph-factories.js +0 -62
- package/dist/document-models/builder-account/gen/profile/actions.d.ts +0 -23
- package/dist/document-models/builder-account/gen/profile/actions.js +0 -1
- package/dist/document-models/builder-account/gen/profile/creators.d.ts +0 -7
- package/dist/document-models/builder-account/gen/profile/creators.js +0 -7
- package/dist/document-models/builder-account/gen/profile/error.d.ts +0 -1
- package/dist/document-models/builder-account/gen/profile/error.js +0 -1
- package/dist/document-models/builder-account/gen/profile/object.d.ts +0 -10
- package/dist/document-models/builder-account/gen/profile/object.js +0 -19
- package/dist/document-models/builder-account/gen/profile/operations.d.ts +0 -10
- package/dist/document-models/builder-account/gen/profile/operations.js +0 -1
- package/dist/document-models/builder-account/gen/reducer.d.ts +0 -4
- package/dist/document-models/builder-account/gen/reducer.js +0 -87
- package/dist/document-models/builder-account/gen/schema/index.d.ts +0 -2
- package/dist/document-models/builder-account/gen/schema/index.js +0 -2
- package/dist/document-models/builder-account/gen/schema/types.d.ts +0 -269
- package/dist/document-models/builder-account/gen/schema/types.js +0 -1
- package/dist/document-models/builder-account/gen/schema/zod.d.ts +0 -34
- package/dist/document-models/builder-account/gen/schema/zod.js +0 -192
- package/dist/document-models/builder-account/gen/spaces/actions.d.ts +0 -23
- package/dist/document-models/builder-account/gen/spaces/actions.js +0 -1
- package/dist/document-models/builder-account/gen/spaces/creators.d.ts +0 -7
- package/dist/document-models/builder-account/gen/spaces/creators.js +0 -7
- package/dist/document-models/builder-account/gen/spaces/error.d.ts +0 -13
- package/dist/document-models/builder-account/gen/spaces/error.js +0 -11
- package/dist/document-models/builder-account/gen/spaces/object.d.ts +0 -10
- package/dist/document-models/builder-account/gen/spaces/object.js +0 -19
- package/dist/document-models/builder-account/gen/spaces/operations.d.ts +0 -10
- package/dist/document-models/builder-account/gen/spaces/operations.js +0 -1
- package/dist/document-models/builder-account/gen/types.d.ts +0 -9
- package/dist/document-models/builder-account/gen/types.js +0 -1
- package/dist/document-models/builder-account/gen/utils.d.ts +0 -21
- package/dist/document-models/builder-account/gen/utils.js +0 -54
- package/dist/document-models/builder-account/index.d.ts +0 -40
- package/dist/document-models/builder-account/index.js +0 -21
- package/dist/document-models/builder-account/src/reducers/members.d.ts +0 -2
- package/dist/document-models/builder-account/src/reducers/members.js +0 -11
- package/dist/document-models/builder-account/src/reducers/packages.d.ts +0 -2
- package/dist/document-models/builder-account/src/reducers/packages.js +0 -108
- package/dist/document-models/builder-account/src/reducers/profile.d.ts +0 -2
- package/dist/document-models/builder-account/src/reducers/profile.js +0 -43
- package/dist/document-models/builder-account/src/reducers/spaces.d.ts +0 -2
- package/dist/document-models/builder-account/src/reducers/spaces.js +0 -52
- package/dist/document-models/builder-account/src/tests/document-model.test.d.ts +0 -5
- package/dist/document-models/builder-account/src/tests/document-model.test.js +0 -18
- package/dist/document-models/builder-account/src/tests/members.test.d.ts +0 -5
- package/dist/document-models/builder-account/src/tests/members.test.js +0 -32
- package/dist/document-models/builder-account/src/tests/packages.test.d.ts +0 -5
- package/dist/document-models/builder-account/src/tests/packages.test.js +0 -56
- package/dist/document-models/builder-account/src/tests/profile.test.d.ts +0 -5
- package/dist/document-models/builder-account/src/tests/profile.test.js +0 -56
- package/dist/document-models/builder-account/src/tests/spaces.test.d.ts +0 -5
- package/dist/document-models/builder-account/src/tests/spaces.test.js +0 -56
- package/dist/document-models/builder-account/src/utils.d.ts +0 -1
- package/dist/document-models/builder-account/src/utils.js +0 -1
- package/dist/document-models/renown-profile/gen/actions.d.ts +0 -5
- package/dist/document-models/renown-profile/gen/actions.js +0 -2
- package/dist/document-models/renown-profile/gen/authorization/actions.d.ts +0 -11
- package/dist/document-models/renown-profile/gen/authorization/actions.js +0 -1
- package/dist/document-models/renown-profile/gen/authorization/creators.d.ts +0 -4
- package/dist/document-models/renown-profile/gen/authorization/creators.js +0 -4
- package/dist/document-models/renown-profile/gen/authorization/error.d.ts +0 -1
- package/dist/document-models/renown-profile/gen/authorization/error.js +0 -1
- package/dist/document-models/renown-profile/gen/authorization/object.d.ts +0 -7
- package/dist/document-models/renown-profile/gen/authorization/object.js +0 -10
- package/dist/document-models/renown-profile/gen/authorization/operations.d.ts +0 -7
- package/dist/document-models/renown-profile/gen/authorization/operations.js +0 -1
- package/dist/document-models/renown-profile/gen/creators.d.ts +0 -2
- package/dist/document-models/renown-profile/gen/creators.js +0 -2
- package/dist/document-models/renown-profile/gen/document-model.d.ts +0 -2
- package/dist/document-models/renown-profile/gen/document-model.js +0 -99
- package/dist/document-models/renown-profile/gen/index.d.ts +0 -7
- package/dist/document-models/renown-profile/gen/index.js +0 -6
- package/dist/document-models/renown-profile/gen/object.d.ts +0 -16
- package/dist/document-models/renown-profile/gen/object.js +0 -30
- package/dist/document-models/renown-profile/gen/ph-factories.d.ts +0 -26
- package/dist/document-models/renown-profile/gen/ph-factories.js +0 -53
- package/dist/document-models/renown-profile/gen/profile/actions.d.ts +0 -15
- package/dist/document-models/renown-profile/gen/profile/actions.js +0 -1
- package/dist/document-models/renown-profile/gen/profile/creators.d.ts +0 -5
- package/dist/document-models/renown-profile/gen/profile/creators.js +0 -5
- package/dist/document-models/renown-profile/gen/profile/error.d.ts +0 -1
- package/dist/document-models/renown-profile/gen/profile/error.js +0 -1
- package/dist/document-models/renown-profile/gen/profile/object.d.ts +0 -8
- package/dist/document-models/renown-profile/gen/profile/object.js +0 -13
- package/dist/document-models/renown-profile/gen/profile/operations.d.ts +0 -8
- package/dist/document-models/renown-profile/gen/profile/operations.js +0 -1
- package/dist/document-models/renown-profile/gen/reducer.d.ts +0 -4
- package/dist/document-models/renown-profile/gen/reducer.js +0 -37
- package/dist/document-models/renown-profile/gen/schema/index.d.ts +0 -2
- package/dist/document-models/renown-profile/gen/schema/index.js +0 -2
- package/dist/document-models/renown-profile/gen/schema/types.d.ts +0 -174
- package/dist/document-models/renown-profile/gen/schema/types.js +0 -1
- package/dist/document-models/renown-profile/gen/schema/zod.d.ts +0 -16
- package/dist/document-models/renown-profile/gen/schema/zod.js +0 -62
- package/dist/document-models/renown-profile/gen/types.d.ts +0 -9
- package/dist/document-models/renown-profile/gen/types.js +0 -1
- package/dist/document-models/renown-profile/gen/utils.d.ts +0 -21
- package/dist/document-models/renown-profile/gen/utils.js +0 -45
- package/dist/document-models/renown-profile/index.d.ts +0 -28
- package/dist/document-models/renown-profile/index.js +0 -21
- package/dist/document-models/renown-profile/src/reducers/authorization.d.ts +0 -2
- package/dist/document-models/renown-profile/src/reducers/authorization.js +0 -8
- package/dist/document-models/renown-profile/src/reducers/profile.d.ts +0 -2
- package/dist/document-models/renown-profile/src/reducers/profile.js +0 -11
- package/dist/document-models/renown-profile/src/tests/authorization.test.d.ts +0 -5
- package/dist/document-models/renown-profile/src/tests/authorization.test.js +0 -24
- package/dist/document-models/renown-profile/src/tests/document-model.test.d.ts +0 -5
- package/dist/document-models/renown-profile/src/tests/document-model.test.js +0 -18
- package/dist/document-models/renown-profile/src/tests/profile.test.d.ts +0 -5
- package/dist/document-models/renown-profile/src/tests/profile.test.js +0 -24
- package/dist/document-models/renown-profile/src/utils.d.ts +0 -1
- package/dist/document-models/renown-profile/src/utils.js +0 -1
- package/dist/document-models/vetra-package/gen/actions.d.ts +0 -3
- package/dist/document-models/vetra-package/gen/actions.js +0 -1
- package/dist/document-models/vetra-package/gen/creators.d.ts +0 -1
- package/dist/document-models/vetra-package/gen/creators.js +0 -1
- package/dist/document-models/vetra-package/gen/document-model.d.ts +0 -2
- package/dist/document-models/vetra-package/gen/document-model.js +0 -125
- package/dist/document-models/vetra-package/gen/index.d.ts +0 -7
- package/dist/document-models/vetra-package/gen/index.js +0 -6
- package/dist/document-models/vetra-package/gen/meta/actions.d.ts +0 -35
- package/dist/document-models/vetra-package/gen/meta/actions.js +0 -1
- package/dist/document-models/vetra-package/gen/meta/creators.d.ts +0 -10
- package/dist/document-models/vetra-package/gen/meta/creators.js +0 -10
- package/dist/document-models/vetra-package/gen/meta/error.d.ts +0 -1
- package/dist/document-models/vetra-package/gen/meta/error.js +0 -1
- package/dist/document-models/vetra-package/gen/meta/object.d.ts +0 -13
- package/dist/document-models/vetra-package/gen/meta/object.js +0 -28
- package/dist/document-models/vetra-package/gen/meta/operations.d.ts +0 -13
- package/dist/document-models/vetra-package/gen/meta/operations.js +0 -1
- package/dist/document-models/vetra-package/gen/object.d.ts +0 -14
- package/dist/document-models/vetra-package/gen/object.js +0 -25
- package/dist/document-models/vetra-package/gen/ph-factories.d.ts +0 -26
- package/dist/document-models/vetra-package/gen/ph-factories.js +0 -59
- package/dist/document-models/vetra-package/gen/reducer.d.ts +0 -4
- package/dist/document-models/vetra-package/gen/reducer.js +0 -48
- package/dist/document-models/vetra-package/gen/schema/index.d.ts +0 -2
- package/dist/document-models/vetra-package/gen/schema/index.js +0 -2
- package/dist/document-models/vetra-package/gen/schema/types.d.ts +0 -187
- package/dist/document-models/vetra-package/gen/schema/types.js +0 -1
- package/dist/document-models/vetra-package/gen/schema/zod.d.ts +0 -20
- package/dist/document-models/vetra-package/gen/schema/zod.js +0 -73
- package/dist/document-models/vetra-package/gen/types.d.ts +0 -9
- package/dist/document-models/vetra-package/gen/types.js +0 -1
- package/dist/document-models/vetra-package/gen/utils.d.ts +0 -21
- package/dist/document-models/vetra-package/gen/utils.js +0 -51
- package/dist/document-models/vetra-package/index.d.ts +0 -31
- package/dist/document-models/vetra-package/index.js +0 -21
- package/dist/document-models/vetra-package/src/reducers/meta.d.ts +0 -2
- package/dist/document-models/vetra-package/src/reducers/meta.js +0 -34
- package/dist/document-models/vetra-package/src/tests/document-model.test.d.ts +0 -5
- package/dist/document-models/vetra-package/src/tests/document-model.test.js +0 -18
- package/dist/document-models/vetra-package/src/tests/meta.test.d.ts +0 -5
- package/dist/document-models/vetra-package/src/tests/meta.test.js +0 -80
- package/dist/document-models/vetra-package/src/utils.d.ts +0 -1
- package/dist/document-models/vetra-package/src/utils.js +0 -1
- package/dist/editors/builder-account-editor/editor.d.ts +0 -3
- package/dist/editors/builder-account-editor/editor.js +0 -195
- package/dist/editors/builder-account-editor/index.d.ts +0 -3
- package/dist/editors/builder-account-editor/index.js +0 -12
- package/dist/editors/hooks/useRenownProfileDocument.d.ts +0 -3
- package/dist/editors/hooks/useRenownProfileDocument.js +0 -8
- package/dist/editors/renown-profile-editor/editor.d.ts +0 -3
- package/dist/editors/renown-profile-editor/editor.js +0 -33
- package/dist/editors/renown-profile-editor/index.d.ts +0 -2
- package/dist/editors/renown-profile-editor/index.js +0 -11
- package/dist/processors/old_vetra-builder-relational-db-processor/factory.d.ts +0 -3
- package/dist/processors/old_vetra-builder-relational-db-processor/factory.js +0 -22
- package/dist/processors/old_vetra-builder-relational-db-processor/index.d.ts +0 -9
- package/dist/processors/old_vetra-builder-relational-db-processor/index.js +0 -32
- package/dist/processors/old_vetra-builder-relational-db-processor/migrations.d.ts +0 -3
- package/dist/processors/old_vetra-builder-relational-db-processor/migrations.js +0 -14
- package/dist/processors/old_vetra-builder-relational-db-processor/schema.d.ts +0 -7
- package/dist/processors/old_vetra-builder-relational-db-processor/schema.js +0 -1
- package/dist/processors/renown-profile/factory.d.ts +0 -3
- package/dist/processors/renown-profile/factory.js +0 -22
- package/dist/processors/renown-profile/index.d.ts +0 -9
- package/dist/processors/renown-profile/index.js +0 -81
- package/dist/processors/renown-profile/migrations.d.ts +0 -3
- package/dist/processors/renown-profile/migrations.js +0 -39
- package/dist/processors/renown-profile/schema.d.ts +0 -14
- package/dist/processors/renown-profile/schema.js +0 -1
- package/dist/processors/renown-read-model/migrations.d.ts +0 -3
- package/dist/processors/renown-read-model/migrations.js +0 -55
- package/dist/processors/renown-read-model/schema.d.ts +0 -21
- package/dist/processors/renown-read-model/schema.js +0 -1
- package/dist/processors/vetra-builder-read-model/builder-account-handlers.d.ts +0 -27
- package/dist/processors/vetra-builder-read-model/builder-account-handlers.js +0 -249
- package/dist/processors/vetra-builder-read-model/database-helpers.d.ts +0 -39
- package/dist/processors/vetra-builder-read-model/database-helpers.js +0 -144
- package/dist/processors/vetra-builder-read-model/factory.d.ts +0 -3
- package/dist/processors/vetra-builder-read-model/factory.js +0 -25
- package/dist/processors/vetra-builder-read-model/index.d.ts +0 -29
- package/dist/processors/vetra-builder-read-model/index.js +0 -370
- package/dist/processors/vetra-builder-read-model/migrations.d.ts +0 -3
- package/dist/processors/vetra-builder-read-model/migrations.js +0 -152
- package/dist/processors/vetra-builder-read-model/package-handlers.d.ts +0 -20
- package/dist/processors/vetra-builder-read-model/package-handlers.js +0 -116
- package/dist/processors/vetra-builder-read-model/schema.d.ts +0 -66
- package/dist/processors/vetra-builder-read-model/schema.js +0 -1
- package/dist/processors/vetra-builder-read-model/types.d.ts +0 -32
- package/dist/processors/vetra-builder-read-model/types.js +0 -1
- package/dist/processors/vetra-read-model/builder-account-handlers.d.ts +0 -27
- package/dist/processors/vetra-read-model/builder-account-handlers.js +0 -249
- package/dist/processors/vetra-read-model/database-helpers.d.ts +0 -39
- package/dist/processors/vetra-read-model/database-helpers.js +0 -144
- package/dist/processors/vetra-read-model/document-drive-handlers.d.ts +0 -21
- package/dist/processors/vetra-read-model/document-drive-handlers.js +0 -77
- package/dist/processors/vetra-read-model/factory.d.ts +0 -3
- package/dist/processors/vetra-read-model/factory.js +0 -25
- package/dist/processors/vetra-read-model/index.d.ts +0 -29
- package/dist/processors/vetra-read-model/index.js +0 -370
- package/dist/processors/vetra-read-model/migrations.d.ts +0 -3
- package/dist/processors/vetra-read-model/migrations.js +0 -152
- package/dist/processors/vetra-read-model/package-handlers.d.ts +0 -20
- package/dist/processors/vetra-read-model/package-handlers.js +0 -116
- package/dist/processors/vetra-read-model/schema.d.ts +0 -66
- package/dist/processors/vetra-read-model/schema.js +0 -1
- package/dist/processors/vetra-read-model/types.d.ts +0 -32
- package/dist/processors/vetra-read-model/types.js +0 -1
- package/dist/subgraphs/builder-account/index.d.ts +0 -10
- package/dist/subgraphs/builder-account/index.js +0 -11
- package/dist/subgraphs/builder-account/resolvers.d.ts +0 -2
- package/dist/subgraphs/builder-account/resolvers.js +0 -276
- package/dist/subgraphs/builder-account/schema.d.ts +0 -2
- package/dist/subgraphs/builder-account/schema.js +0 -267
- package/dist/subgraphs/renown-profile/index.d.ts +0 -10
- package/dist/subgraphs/renown-profile/index.js +0 -11
- package/dist/subgraphs/renown-profile/resolvers.d.ts +0 -2
- package/dist/subgraphs/renown-profile/resolvers.js +0 -151
- package/dist/subgraphs/renown-profile/schema.d.ts +0 -2
- package/dist/subgraphs/renown-profile/schema.js +0 -104
- package/dist/subgraphs/renown-read-model/index.d.ts +0 -10
- package/dist/subgraphs/renown-read-model/index.js +0 -11
- package/dist/subgraphs/renown-read-model/resolvers.d.ts +0 -2
- package/dist/subgraphs/renown-read-model/resolvers.js +0 -25
- package/dist/subgraphs/renown-read-model/schema.d.ts +0 -2
- package/dist/subgraphs/renown-read-model/schema.js +0 -16
- package/dist/subgraphs/vetra/index.d.ts +0 -10
- package/dist/subgraphs/vetra/index.js +0 -11
- package/dist/subgraphs/vetra/resolvers.d.ts +0 -2
- package/dist/subgraphs/vetra/resolvers.js +0 -10
- package/dist/subgraphs/vetra/schema.d.ts +0 -2
- package/dist/subgraphs/vetra/schema.js +0 -9
- package/dist/subgraphs/vetra-builder-read-model/index.d.ts +0 -10
- package/dist/subgraphs/vetra-builder-read-model/index.js +0 -11
- package/dist/subgraphs/vetra-builder-read-model/resolvers.d.ts +0 -2
- package/dist/subgraphs/vetra-builder-read-model/resolvers.js +0 -174
- package/dist/subgraphs/vetra-builder-read-model/schema.d.ts +0 -2
- package/dist/subgraphs/vetra-builder-read-model/schema.js +0 -79
- package/dist/subgraphs/vetra-builders-bkp/index.d.ts +0 -10
- package/dist/subgraphs/vetra-builders-bkp/index.js +0 -11
- package/dist/subgraphs/vetra-builders-bkp/resolvers.d.ts +0 -2
- package/dist/subgraphs/vetra-builders-bkp/resolvers.js +0 -10
- package/dist/subgraphs/vetra-builders-bkp/schema.d.ts +0 -2
- package/dist/subgraphs/vetra-builders-bkp/schema.js +0 -9
- package/dist/subgraphs/vetra-package/index.d.ts +0 -10
- package/dist/subgraphs/vetra-package/index.js +0 -11
- package/dist/subgraphs/vetra-package/resolvers.d.ts +0 -2
- package/dist/subgraphs/vetra-package/resolvers.js +0 -168
- package/dist/subgraphs/vetra-package/schema.d.ts +0 -2
- package/dist/subgraphs/vetra-package/schema.js +0 -123
- package/dist/subgraphs/vetra-read-model/index.d.ts +0 -10
- package/dist/subgraphs/vetra-read-model/index.js +0 -11
- package/dist/subgraphs/vetra-read-model/resolvers.d.ts +0 -2
- package/dist/subgraphs/vetra-read-model/resolvers.js +0 -174
- package/dist/subgraphs/vetra-read-model/schema.d.ts +0 -2
- package/dist/subgraphs/vetra-read-model/schema.js +0 -79
|
@@ -1,267 +0,0 @@
|
|
|
1
|
-
import { gql } from "graphql-tag";
|
|
2
|
-
export const schema = gql `
|
|
3
|
-
"""
|
|
4
|
-
Subgraph definition for BuilderAccount (powerhouse/vetra/builder-account)
|
|
5
|
-
"""
|
|
6
|
-
type BuilderAccountState {
|
|
7
|
-
profile: VetraBuilderProfile!
|
|
8
|
-
members: [EthereumAddress!]!
|
|
9
|
-
spaces: [VetraBuilderSpace!]!
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
type VetraBuilderProfile {
|
|
13
|
-
logo: URL
|
|
14
|
-
name: String!
|
|
15
|
-
slug: String!
|
|
16
|
-
description: String
|
|
17
|
-
socials: VetraBuilderSocials!
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
type VetraBuilderSocials {
|
|
21
|
-
xProfile: URL
|
|
22
|
-
github: URL
|
|
23
|
-
website: URL
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
type VetraBuilderSpace {
|
|
27
|
-
id: OID!
|
|
28
|
-
title: String!
|
|
29
|
-
description: String
|
|
30
|
-
packages: [VetraBuilderPackage!]!
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
type VetraBuilderPackage {
|
|
34
|
-
id: OID!
|
|
35
|
-
name: String!
|
|
36
|
-
description: String
|
|
37
|
-
category: String
|
|
38
|
-
author: VetraBuilderPackageAuthor!
|
|
39
|
-
keywords: [VetraBuilderPackageKeyword!]!
|
|
40
|
-
github: URL
|
|
41
|
-
npm: URL
|
|
42
|
-
vetraDriveUrl: URL
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
type VetraBuilderPackageAuthor {
|
|
46
|
-
name: String!
|
|
47
|
-
website: URL
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
type VetraBuilderPackageKeyword {
|
|
51
|
-
id: OID!
|
|
52
|
-
label: String!
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
"""
|
|
56
|
-
Queries: BuilderAccount
|
|
57
|
-
"""
|
|
58
|
-
type BuilderAccountQueries {
|
|
59
|
-
getDocument(docId: PHID!, driveId: PHID): BuilderAccount
|
|
60
|
-
getDocuments(driveId: String!): [BuilderAccount!]
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
type Query {
|
|
64
|
-
BuilderAccount: BuilderAccountQueries
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
"""
|
|
68
|
-
Mutations: BuilderAccount
|
|
69
|
-
"""
|
|
70
|
-
type Mutation {
|
|
71
|
-
BuilderAccount_createDocument(name: String!, driveId: String): String
|
|
72
|
-
|
|
73
|
-
BuilderAccount_setLogoooo(
|
|
74
|
-
driveId: String
|
|
75
|
-
docId: PHID
|
|
76
|
-
input: BuilderAccount_SetLogooooInput
|
|
77
|
-
): Int
|
|
78
|
-
BuilderAccount_setProfileName(
|
|
79
|
-
driveId: String
|
|
80
|
-
docId: PHID
|
|
81
|
-
input: BuilderAccount_SetProfileNameInput
|
|
82
|
-
): Int
|
|
83
|
-
BuilderAccount_setSlug(
|
|
84
|
-
driveId: String
|
|
85
|
-
docId: PHID
|
|
86
|
-
input: BuilderAccount_SetSlugInput
|
|
87
|
-
): Int
|
|
88
|
-
BuilderAccount_setProfileDescription(
|
|
89
|
-
driveId: String
|
|
90
|
-
docId: PHID
|
|
91
|
-
input: BuilderAccount_SetProfileDescriptionInput
|
|
92
|
-
): Int
|
|
93
|
-
BuilderAccount_updateSocials(
|
|
94
|
-
driveId: String
|
|
95
|
-
docId: PHID
|
|
96
|
-
input: BuilderAccount_UpdateSocialsInput
|
|
97
|
-
): Int
|
|
98
|
-
BuilderAccount_addMember(
|
|
99
|
-
driveId: String
|
|
100
|
-
docId: PHID
|
|
101
|
-
input: BuilderAccount_AddMemberInput
|
|
102
|
-
): Int
|
|
103
|
-
BuilderAccount_removeMember(
|
|
104
|
-
driveId: String
|
|
105
|
-
docId: PHID
|
|
106
|
-
input: BuilderAccount_RemoveMemberInput
|
|
107
|
-
): Int
|
|
108
|
-
BuilderAccount_addSpace(
|
|
109
|
-
driveId: String
|
|
110
|
-
docId: PHID
|
|
111
|
-
input: BuilderAccount_AddSpaceInput
|
|
112
|
-
): Int
|
|
113
|
-
BuilderAccount_deleteSpace(
|
|
114
|
-
driveId: String
|
|
115
|
-
docId: PHID
|
|
116
|
-
input: BuilderAccount_DeleteSpaceInput
|
|
117
|
-
): Int
|
|
118
|
-
BuilderAccount_setSpaceTitle(
|
|
119
|
-
driveId: String
|
|
120
|
-
docId: PHID
|
|
121
|
-
input: BuilderAccount_SetSpaceTitleInput
|
|
122
|
-
): Int
|
|
123
|
-
BuilderAccount_setSpaceDescription(
|
|
124
|
-
driveId: String
|
|
125
|
-
docId: PHID
|
|
126
|
-
input: BuilderAccount_SetSpaceDescriptionInput
|
|
127
|
-
): Int
|
|
128
|
-
BuilderAccount_reorderSpaces(
|
|
129
|
-
driveId: String
|
|
130
|
-
docId: PHID
|
|
131
|
-
input: BuilderAccount_ReorderSpacesInput
|
|
132
|
-
): Int
|
|
133
|
-
BuilderAccount_addPackage(
|
|
134
|
-
driveId: String
|
|
135
|
-
docId: PHID
|
|
136
|
-
input: BuilderAccount_AddPackageInput
|
|
137
|
-
): Int
|
|
138
|
-
BuilderAccount_setPackageDriveId(
|
|
139
|
-
driveId: String
|
|
140
|
-
docId: PHID
|
|
141
|
-
input: BuilderAccount_SetPackageDriveIdInput
|
|
142
|
-
): Int
|
|
143
|
-
BuilderAccount_updatePackage(
|
|
144
|
-
driveId: String
|
|
145
|
-
docId: PHID
|
|
146
|
-
input: BuilderAccount_UpdatePackageInput
|
|
147
|
-
): Int
|
|
148
|
-
BuilderAccount_reorderPackages(
|
|
149
|
-
driveId: String
|
|
150
|
-
docId: PHID
|
|
151
|
-
input: BuilderAccount_ReorderPackagesInput
|
|
152
|
-
): Int
|
|
153
|
-
BuilderAccount_deletePackage(
|
|
154
|
-
driveId: String
|
|
155
|
-
docId: PHID
|
|
156
|
-
input: BuilderAccount_DeletePackageInput
|
|
157
|
-
): Int
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
"""
|
|
161
|
-
Module: Profile
|
|
162
|
-
"""
|
|
163
|
-
input BuilderAccount_SetLogoInput {
|
|
164
|
-
"Add your inputs here"
|
|
165
|
-
logoUrl: String!
|
|
166
|
-
}
|
|
167
|
-
input BuilderAccount_SetProfileNameInput {
|
|
168
|
-
"Add your inputs here"
|
|
169
|
-
name: String!
|
|
170
|
-
}
|
|
171
|
-
input BuilderAccount_SetSlugInput {
|
|
172
|
-
"Add your inputs here"
|
|
173
|
-
slug: String!
|
|
174
|
-
}
|
|
175
|
-
input BuilderAccount_SetProfileDescriptionInput {
|
|
176
|
-
"Add your inputs here"
|
|
177
|
-
description: String
|
|
178
|
-
}
|
|
179
|
-
input BuilderAccount_UpdateSocialsInput {
|
|
180
|
-
"Add your inputs here"
|
|
181
|
-
x: URL
|
|
182
|
-
github: URL
|
|
183
|
-
website: URL
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
"""
|
|
187
|
-
Module: Members
|
|
188
|
-
"""
|
|
189
|
-
input BuilderAccount_AddMemberInput {
|
|
190
|
-
"Add your inputs here"
|
|
191
|
-
ethAddress: EthereumAddress
|
|
192
|
-
}
|
|
193
|
-
input BuilderAccount_RemoveMemberInput {
|
|
194
|
-
"Add your inputs here"
|
|
195
|
-
ethAddress: EthereumAddress
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
"""
|
|
199
|
-
Module: Spaces
|
|
200
|
-
"""
|
|
201
|
-
input BuilderAccount_AddSpaceInput {
|
|
202
|
-
"Add your inputs here"
|
|
203
|
-
title: String!
|
|
204
|
-
description: String
|
|
205
|
-
}
|
|
206
|
-
input BuilderAccount_DeleteSpaceInput {
|
|
207
|
-
"Add your inputs here"
|
|
208
|
-
id: OID!
|
|
209
|
-
}
|
|
210
|
-
input BuilderAccount_SetSpaceTitleInput {
|
|
211
|
-
"Add your inputs here"
|
|
212
|
-
id: OID!
|
|
213
|
-
newTitle: String!
|
|
214
|
-
}
|
|
215
|
-
input BuilderAccount_SetSpaceDescriptionInput {
|
|
216
|
-
"Add your inputs here"
|
|
217
|
-
id: OID!
|
|
218
|
-
description: String!
|
|
219
|
-
}
|
|
220
|
-
input BuilderAccount_ReorderSpacesInput {
|
|
221
|
-
"Add your inputs here"
|
|
222
|
-
ids: [OID!]!
|
|
223
|
-
insertAfter: OID
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
"""
|
|
227
|
-
Module: Packages
|
|
228
|
-
"""
|
|
229
|
-
input BuilderAccount_AuthorInput {
|
|
230
|
-
name: String!
|
|
231
|
-
website: URL
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
input AddPackageInput {
|
|
235
|
-
"Add your inputs here"
|
|
236
|
-
spaceId: OID!
|
|
237
|
-
name: String!
|
|
238
|
-
description: String
|
|
239
|
-
category: String
|
|
240
|
-
author: AuthorInput
|
|
241
|
-
keywords: [String!]
|
|
242
|
-
github: URL
|
|
243
|
-
npm: URL
|
|
244
|
-
vetraDriveUrl: URL
|
|
245
|
-
}
|
|
246
|
-
input BuilderAccount_SetPackageDriveIdInput {
|
|
247
|
-
"Add your inputs here"
|
|
248
|
-
packageId: OID!
|
|
249
|
-
driveId: String
|
|
250
|
-
}
|
|
251
|
-
input BuilderAccount_UpdatePackageInput {
|
|
252
|
-
"Add your inputs here"
|
|
253
|
-
id: OID!
|
|
254
|
-
title: String
|
|
255
|
-
description: String
|
|
256
|
-
}
|
|
257
|
-
input BuilderAccount_ReorderPackagesInput {
|
|
258
|
-
"Add your inputs here"
|
|
259
|
-
spaceId: OID!
|
|
260
|
-
ids: [OID!]!
|
|
261
|
-
insertAfter: OID
|
|
262
|
-
}
|
|
263
|
-
input BuilderAccount_DeletePackageInput {
|
|
264
|
-
"Add your inputs here"
|
|
265
|
-
id: OID!
|
|
266
|
-
}
|
|
267
|
-
`;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Subgraph } from "@powerhousedao/reactor-api";
|
|
2
|
-
import type { DocumentNode } from "graphql";
|
|
3
|
-
export declare class RenownProfileSubgraph extends Subgraph {
|
|
4
|
-
name: string;
|
|
5
|
-
typeDefs: DocumentNode;
|
|
6
|
-
resolvers: Record<string, unknown>;
|
|
7
|
-
additionalContextFields: {};
|
|
8
|
-
onSetup(): Promise<void>;
|
|
9
|
-
onDisconnect(): Promise<void>;
|
|
10
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Subgraph } from "@powerhousedao/reactor-api";
|
|
2
|
-
import { schema } from "./schema.js";
|
|
3
|
-
import { getResolvers } from "./resolvers.js";
|
|
4
|
-
export class RenownProfileSubgraph extends Subgraph {
|
|
5
|
-
name = "renown-profile";
|
|
6
|
-
typeDefs = schema;
|
|
7
|
-
resolvers = getResolvers(this);
|
|
8
|
-
additionalContextFields = {};
|
|
9
|
-
async onSetup() { }
|
|
10
|
-
async onDisconnect() { }
|
|
11
|
-
}
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
import { addFile } from "document-drive";
|
|
2
|
-
import { setName } from "document-model";
|
|
3
|
-
import { RenownProfileProcessor } from "../../processors/renown-profile/index.js";
|
|
4
|
-
import { actions, } from "../../document-models/renown-profile/index.js";
|
|
5
|
-
export const getResolvers = (subgraph) => {
|
|
6
|
-
const reactor = subgraph.reactor;
|
|
7
|
-
const db = subgraph.relationalDb;
|
|
8
|
-
return {
|
|
9
|
-
Query: {
|
|
10
|
-
Renown: async () => {
|
|
11
|
-
return {
|
|
12
|
-
getProfile: async (args) => {
|
|
13
|
-
const { ethAddress, driveId } = args;
|
|
14
|
-
const profile = await RenownProfileProcessor.query(driveId, db)
|
|
15
|
-
.selectFrom("renown_profile")
|
|
16
|
-
.selectAll()
|
|
17
|
-
.where("eth_address", "=", ethAddress)
|
|
18
|
-
.executeTakeFirst();
|
|
19
|
-
return {
|
|
20
|
-
...profile,
|
|
21
|
-
documentId: profile?.document_id,
|
|
22
|
-
ethAddress: profile?.eth_address,
|
|
23
|
-
username: profile?.username,
|
|
24
|
-
userImage: profile?.user_image,
|
|
25
|
-
createdAt: profile?.created_at,
|
|
26
|
-
updatedAt: profile?.updated_at,
|
|
27
|
-
};
|
|
28
|
-
},
|
|
29
|
-
getDocument: async (args) => {
|
|
30
|
-
const { docId, driveId } = args;
|
|
31
|
-
if (!docId) {
|
|
32
|
-
throw new Error("Document id is required");
|
|
33
|
-
}
|
|
34
|
-
if (driveId) {
|
|
35
|
-
const docIds = await reactor.getDocuments(driveId);
|
|
36
|
-
if (!docIds.includes(docId)) {
|
|
37
|
-
throw new Error(`Document with id ${docId} is not part of ${driveId}`);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
const doc = await reactor.getDocument(docId);
|
|
41
|
-
return {
|
|
42
|
-
driveId: driveId,
|
|
43
|
-
...doc,
|
|
44
|
-
...doc.header,
|
|
45
|
-
created: doc.header.createdAtUtcIso,
|
|
46
|
-
lastModified: doc.header.lastModifiedAtUtcIso,
|
|
47
|
-
state: doc.state.global,
|
|
48
|
-
stateJSON: doc.state.global,
|
|
49
|
-
revision: doc.header?.revision?.global ?? 0,
|
|
50
|
-
};
|
|
51
|
-
},
|
|
52
|
-
getDocuments: async (args) => {
|
|
53
|
-
const { driveId } = args;
|
|
54
|
-
const docsIds = await reactor.getDocuments(driveId);
|
|
55
|
-
const docs = await Promise.all(docsIds.map(async (docId) => {
|
|
56
|
-
const doc = await reactor.getDocument(docId);
|
|
57
|
-
return {
|
|
58
|
-
driveId: driveId,
|
|
59
|
-
...doc,
|
|
60
|
-
...doc.header,
|
|
61
|
-
created: doc.header.createdAtUtcIso,
|
|
62
|
-
lastModified: doc.header.lastModifiedAtUtcIso,
|
|
63
|
-
state: doc.state.global,
|
|
64
|
-
stateJSON: doc.state.global,
|
|
65
|
-
revision: doc.header?.revision?.global ?? 0,
|
|
66
|
-
};
|
|
67
|
-
}));
|
|
68
|
-
return docs.filter((doc) => doc.header.documentType === "powerhouse/renown-profile");
|
|
69
|
-
},
|
|
70
|
-
};
|
|
71
|
-
},
|
|
72
|
-
},
|
|
73
|
-
Mutation: {
|
|
74
|
-
RenownProfile_createDocument: async (_, args) => {
|
|
75
|
-
const { driveId, name } = args;
|
|
76
|
-
const document = await reactor.addDocument("powerhouse/renown-profile");
|
|
77
|
-
if (driveId) {
|
|
78
|
-
await reactor.addAction(driveId, addFile({
|
|
79
|
-
name,
|
|
80
|
-
id: document.header.id,
|
|
81
|
-
documentType: "powerhouse/renown-profile",
|
|
82
|
-
}));
|
|
83
|
-
}
|
|
84
|
-
if (name) {
|
|
85
|
-
await reactor.addAction(document.header.id, setName(name));
|
|
86
|
-
}
|
|
87
|
-
return document.header.id;
|
|
88
|
-
},
|
|
89
|
-
RenownProfile_setUsername: async (_, args) => {
|
|
90
|
-
const { docId, input } = args;
|
|
91
|
-
const doc = await reactor.getDocument(docId);
|
|
92
|
-
if (!doc) {
|
|
93
|
-
throw new Error("Document not found");
|
|
94
|
-
}
|
|
95
|
-
const result = await reactor.addAction(docId, actions.setUsername(input));
|
|
96
|
-
if (result.status !== "SUCCESS") {
|
|
97
|
-
throw new Error(result.error?.message ?? "Failed to setUsername");
|
|
98
|
-
}
|
|
99
|
-
return true;
|
|
100
|
-
},
|
|
101
|
-
RenownProfile_setEthAddress: async (_, args) => {
|
|
102
|
-
const { docId, input } = args;
|
|
103
|
-
const doc = await reactor.getDocument(docId);
|
|
104
|
-
if (!doc) {
|
|
105
|
-
throw new Error("Document not found");
|
|
106
|
-
}
|
|
107
|
-
const result = await reactor.addAction(docId, actions.setEthAddress(input));
|
|
108
|
-
if (result.status !== "SUCCESS") {
|
|
109
|
-
throw new Error(result.error?.message ?? "Failed to setEthAddress");
|
|
110
|
-
}
|
|
111
|
-
return true;
|
|
112
|
-
},
|
|
113
|
-
RenownProfile_setUserImage: async (_, args) => {
|
|
114
|
-
const { docId, input } = args;
|
|
115
|
-
const doc = await reactor.getDocument(docId);
|
|
116
|
-
if (!doc) {
|
|
117
|
-
throw new Error("Document not found");
|
|
118
|
-
}
|
|
119
|
-
const result = await reactor.addAction(docId, actions.setUserImage(input));
|
|
120
|
-
if (result.status !== "SUCCESS") {
|
|
121
|
-
throw new Error(result.error?.message ?? "Failed to setUserImage");
|
|
122
|
-
}
|
|
123
|
-
return true;
|
|
124
|
-
},
|
|
125
|
-
RenownProfile_addAuthorization: async (_, args) => {
|
|
126
|
-
const { docId, input } = args;
|
|
127
|
-
const doc = await reactor.getDocument(docId);
|
|
128
|
-
if (!doc) {
|
|
129
|
-
throw new Error("Document not found");
|
|
130
|
-
}
|
|
131
|
-
const result = await reactor.addAction(docId, actions.addAuthorization(input));
|
|
132
|
-
if (result.status !== "SUCCESS") {
|
|
133
|
-
throw new Error(result.error?.message ?? "Failed to addAuthorization");
|
|
134
|
-
}
|
|
135
|
-
return true;
|
|
136
|
-
},
|
|
137
|
-
RenownProfile_revokeAuthorization: async (_, args) => {
|
|
138
|
-
const { docId, input } = args;
|
|
139
|
-
const doc = await reactor.getDocument(docId);
|
|
140
|
-
if (!doc) {
|
|
141
|
-
throw new Error("Document not found");
|
|
142
|
-
}
|
|
143
|
-
const result = await reactor.addAction(docId, actions.revokeAuthorization(input));
|
|
144
|
-
if (result.status !== "SUCCESS") {
|
|
145
|
-
throw new Error(result.error?.message ?? "Failed to revokeAuthorization");
|
|
146
|
-
}
|
|
147
|
-
return true;
|
|
148
|
-
},
|
|
149
|
-
},
|
|
150
|
-
};
|
|
151
|
-
};
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { gql } from "graphql-tag";
|
|
2
|
-
export const schema = gql `
|
|
3
|
-
"""
|
|
4
|
-
Subgraph definition for RenownProfile (powerhouse/renown-profile)
|
|
5
|
-
"""
|
|
6
|
-
type RenownProfileState {
|
|
7
|
-
"Add your global state fields here"
|
|
8
|
-
documentId: String
|
|
9
|
-
username: String
|
|
10
|
-
ethAddress: EthereumAddress
|
|
11
|
-
userImage: String
|
|
12
|
-
authorizations: [RenownAuthorization!]!
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
# Issuer is ETH Address
|
|
16
|
-
# Subject is the DID for Connect
|
|
17
|
-
# Audience is the target ie did:web:staging.vetra.io
|
|
18
|
-
# expiry
|
|
19
|
-
type RenownAuthorization {
|
|
20
|
-
id: OID!
|
|
21
|
-
audience: String
|
|
22
|
-
issuer: String!
|
|
23
|
-
subject: String!
|
|
24
|
-
expiry: Int
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
"""
|
|
28
|
-
Queries: RenownProfile
|
|
29
|
-
"""
|
|
30
|
-
type RenownProfileQueries {
|
|
31
|
-
getProfile(ethAddress: String!, driveId: String!): RenownProfileState
|
|
32
|
-
getDocument(docId: PHID!, driveId: PHID): RenownProfile
|
|
33
|
-
getDocuments(driveId: String!): [RenownProfile!]
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
type Query {
|
|
37
|
-
Renown: RenownProfileQueries
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
"""
|
|
41
|
-
Mutations: RenownProfile
|
|
42
|
-
"""
|
|
43
|
-
type Mutation {
|
|
44
|
-
RenownProfile_createDocument(name: String!, driveId: String): String
|
|
45
|
-
|
|
46
|
-
RenownProfile_setUsername(
|
|
47
|
-
driveId: String
|
|
48
|
-
docId: PHID
|
|
49
|
-
input: RenownProfile_SetUsernameInput
|
|
50
|
-
): Int
|
|
51
|
-
RenownProfile_setEthAddress(
|
|
52
|
-
driveId: String
|
|
53
|
-
docId: PHID
|
|
54
|
-
input: RenownProfile_SetEthAddressInput
|
|
55
|
-
): Int
|
|
56
|
-
RenownProfile_setUserImage(
|
|
57
|
-
driveId: String
|
|
58
|
-
docId: PHID
|
|
59
|
-
input: RenownProfile_SetUserImageInput
|
|
60
|
-
): Int
|
|
61
|
-
RenownProfile_addAuthorization(
|
|
62
|
-
driveId: String
|
|
63
|
-
docId: PHID
|
|
64
|
-
input: RenownProfile_AddAuthorizationInput
|
|
65
|
-
): Int
|
|
66
|
-
RenownProfile_revokeAuthorization(
|
|
67
|
-
driveId: String
|
|
68
|
-
docId: PHID
|
|
69
|
-
input: RenownProfile_RevokeAuthorizationInput
|
|
70
|
-
): Int
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
"""
|
|
74
|
-
Module: Profile
|
|
75
|
-
"""
|
|
76
|
-
input RenownProfile_SetUsernameInput {
|
|
77
|
-
"Add your inputs here"
|
|
78
|
-
username: String!
|
|
79
|
-
}
|
|
80
|
-
input RenownProfile_SetEthAddressInput {
|
|
81
|
-
"Add your inputs here"
|
|
82
|
-
ethAddress: EthereumAddress!
|
|
83
|
-
}
|
|
84
|
-
input RenownProfile_SetUserImageInput {
|
|
85
|
-
"Add your inputs here"
|
|
86
|
-
userImage: String
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
"""
|
|
90
|
-
Module: Authorization
|
|
91
|
-
"""
|
|
92
|
-
input RenownProfile_AddAuthorizationInput {
|
|
93
|
-
"Add your inputs here"
|
|
94
|
-
id: OID!
|
|
95
|
-
audience: String
|
|
96
|
-
issuer: String!
|
|
97
|
-
subject: String!
|
|
98
|
-
expiry: Int
|
|
99
|
-
}
|
|
100
|
-
input RenownProfile_RevokeAuthorizationInput {
|
|
101
|
-
"Add your inputs here"
|
|
102
|
-
authorizationId: OID!
|
|
103
|
-
}
|
|
104
|
-
`;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Subgraph } from "@powerhousedao/reactor-api";
|
|
2
|
-
import type { DocumentNode } from "graphql";
|
|
3
|
-
export declare class RenownReadModelSubgraph extends Subgraph {
|
|
4
|
-
name: string;
|
|
5
|
-
typeDefs: DocumentNode;
|
|
6
|
-
resolvers: Record<string, unknown>;
|
|
7
|
-
additionalContextFields: {};
|
|
8
|
-
onSetup(): Promise<void>;
|
|
9
|
-
onDisconnect(): Promise<void>;
|
|
10
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Subgraph } from "@powerhousedao/reactor-api";
|
|
2
|
-
import { schema } from "./schema.js";
|
|
3
|
-
import { getResolvers } from "./resolvers.js";
|
|
4
|
-
export class RenownReadModelSubgraph extends Subgraph {
|
|
5
|
-
name = "renown-read-model";
|
|
6
|
-
typeDefs = schema;
|
|
7
|
-
resolvers = getResolvers(this);
|
|
8
|
-
additionalContextFields = {};
|
|
9
|
-
async onSetup() { }
|
|
10
|
-
async onDisconnect() { }
|
|
11
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { RenownProfileProcessor } from "processors/renown-profile";
|
|
2
|
-
export const getResolvers = (subgraph) => {
|
|
3
|
-
const reactor = subgraph.reactor;
|
|
4
|
-
const db = subgraph.relationalDb;
|
|
5
|
-
return {
|
|
6
|
-
Query: {
|
|
7
|
-
getUserProfile: async (parent, args) => {
|
|
8
|
-
const profile = await RenownProfileProcessor.query(args.driveId || "renown-profiles", db)
|
|
9
|
-
.selectFrom("renown_profile")
|
|
10
|
-
.selectAll()
|
|
11
|
-
.where("eth_address", "=", args.ethAddress)
|
|
12
|
-
.executeTakeFirst();
|
|
13
|
-
if (!profile) {
|
|
14
|
-
return null;
|
|
15
|
-
}
|
|
16
|
-
return {
|
|
17
|
-
documentId: profile.document_id,
|
|
18
|
-
ethAddress: profile.eth_address,
|
|
19
|
-
username: profile.username,
|
|
20
|
-
userImage: profile.user_image,
|
|
21
|
-
};
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
};
|
|
25
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { gql } from "graphql-tag";
|
|
2
|
-
export const schema = gql `
|
|
3
|
-
"""
|
|
4
|
-
Subgraph definition
|
|
5
|
-
"""
|
|
6
|
-
type Query {
|
|
7
|
-
getUserProfile(ethAddress: String!, driveId: String!): RenownProfile
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
type RenownProfile {
|
|
11
|
-
documentId: String
|
|
12
|
-
ethAddress: String
|
|
13
|
-
username: String
|
|
14
|
-
userImage: String
|
|
15
|
-
}
|
|
16
|
-
`;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Subgraph } from "@powerhousedao/reactor-api";
|
|
2
|
-
import type { DocumentNode } from "graphql";
|
|
3
|
-
export declare class VetraSubgraph extends Subgraph {
|
|
4
|
-
name: string;
|
|
5
|
-
typeDefs: DocumentNode;
|
|
6
|
-
resolvers: Record<string, unknown>;
|
|
7
|
-
additionalContextFields: {};
|
|
8
|
-
onSetup(): Promise<void>;
|
|
9
|
-
onDisconnect(): Promise<void>;
|
|
10
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Subgraph } from "@powerhousedao/reactor-api";
|
|
2
|
-
import { schema } from "./schema.js";
|
|
3
|
-
import { getResolvers } from "./resolvers.js";
|
|
4
|
-
export class VetraSubgraph extends Subgraph {
|
|
5
|
-
name = "vetra";
|
|
6
|
-
typeDefs = schema;
|
|
7
|
-
resolvers = getResolvers(this);
|
|
8
|
-
additionalContextFields = {};
|
|
9
|
-
async onSetup() { }
|
|
10
|
-
async onDisconnect() { }
|
|
11
|
-
}
|