Most of the events processed by the query node are now mapped to corresponding {event_name}Event
entities, which implement the Event
interface.
Events of different types can be queried together, for example, take a look at the query below:
{
events(
where: {
type_in: [
AppliedOnOpeningEvent
ApplicationWithdrawnEvent
BudgetSpendingEvent
StakeDecreasedEvent
StakeIncreasedEvent
OpeningAddedEvent
OpeningCanceledEvent
OpeningFilledEvent
WorkerExitedEvent
StatusTextChangedEvent
BudgetSetEvent
StakeSlashedEvent
TerminatedLeaderEvent
TerminatedWorkerEvent
]
}
limit: 25
orderBy: [createdAt_DESC]
) {
... on AppliedOnOpeningEvent {
...AppliedOnOpeningEventFields
}
... on ApplicationWithdrawnEvent {
...ApplicationWithdrawnEventFields
}
... on BudgetSpendingEvent {
...BudgetSpendingActivityEventFields
}
... on StakeDecreasedEvent {
...StakeDecreasedEventFields
}
... on StakeIncreasedEvent {
...StakeIncreasedEventFields
}
... on OpeningAddedEvent {
...OpeningAddedEventFields
}
... on OpeningCanceledEvent {
...OpeningCanceledEventFields
}
... on OpeningFilledEvent {
...OpeningFilledEventFields
}
... on WorkerExitedEvent {
...WorkerExitedEventFields
}
... on StatusTextChangedEvent {
...StatusTextChangedEventFields
}
... on BudgetSetEvent {
...BudgetSetEventFields
}
... on StakeSlashedEvent {
...StakeSlashedEventFields
}
... on TerminatedWorkerEvent {
...TerminatedWorkerEventFields
}
... on TerminatedLeaderEvent {
...TerminatedLeaderEventFields
}
}
}
There is a separate file with the event input schemas for each module that has some events mapped to entities:
membershipEvents.graphql
councilEvents.graphql
forumEvents.graphql
proposalsEvents.graphql
proposalDiscussionEvents.graphql
workingGroupsEvents.graphql
Runtime modules for which the mappings have been introduced in Olympia (there were no mappings in Giza):
avatarUri
and about
fields have been removed from Membership
entity. They are now part of MemberMetadata
, along with the new name
field. Additionally, avatarUri
is now of Avatar
union type with AvatarUri
and AvatarObject
variants. Currently only AvatarUri
variant is actually being used.MembershipEntryMethod
(Membership.entry
) is now an union
(previously an enum
) with 3 variants: MembershipEntryPaid
, MembershipEntryInvited
and MembershipEntryGenesis
. The first two include a reference to the event which caused the membership to be created (MembershipBoughtEvent
/ MemberInvitedEvent
)createdInBlock
field has been removed from the Membership
entity. Use .entry.{membershipBoughtEvent|memberInvitedEvent}.inBlock
instead.subscription
field has been removed.Membership
because of the introduction of the member invitations feature, referrals and mappings for other modules, which have bidirectional relations to Membership
. For reference, see the full Membership
schema.MembershipSystemSnapshot
entity has been introduced, which describes a snapshot of the membership system configuration parameters that can be changed through proposals. Those include default invitations count for new members, membership price, referral cut and initial balance of an invited member.Gateway
and Storage
groups were supported)Worker.id
now has a {workingGroupModuleName}-{workerId}
format, for example: storageWorkingGroup-1
.Worker.isActive
field has been removed in favor of Worker.status
union (Note that isActive
may be re-introduced after https://github.com/Joystream/joystream/issues/2657)Worker.type
enum has been replaced by Worker.group
, which is a reference to the new WorkingGroup
entity (each supported group has a corresponding WorkingGroup
record).Worker.workerId
(String
) is now Worker.runtimeId
(Int
)Worker.metadata
is now Worker.storage