Protected Optional _configTrait instance configuration.
Protected _globalWhether this is a global (not bound to any specific schema item) trait instance.
Protected Optional _typeTrait type.
Attaches Trait callbacks to schema item hooks.
Makes this Trait instance global.
This method is triggered when a trait callback has been activated
This is the name of the callback function to call.
References to the Graph Hanlder
Request data passed along as part of the request.
Configuration setter.
The new configuration.
Helper method for wrapping legacy Kosmos traits callbacks.
TODO: Remove this method once all Traits are converted.
Optional callbackName: stringOptional callback name; passing this parameter will additionally wrap the callback into legacy process().
Static traitGenerated using TypeDoc
The membership trait is used to add additional membership functionality to a Vertex, when the trait is added it connects a new entityMembership vertex to the Entity via a hasMembership edge. This entity hold any data required by the membership trait.
Notes:
A user can access the following functionality (depending on permissions):
Queries:
listInvites: list all outstanding invites the user has madelistMembers: list all outstanding invites the user has madeMutations:
accept: accept invitationreject: reject invitationleave: leave a membershipinvite: create a new invitationremove: remove a membershipaccess: update membership type (hidden/visible)updateRole: updateacceptandrejectactions are only accessible if user (or invited entity) is not a member.Permissions for other actions are:
Usage:
Default roles are Viewer, Editor and Manager.
Passive membership configuration example:
Roles can be still configured for passive memberships in case you want to define a different default role for a creator, like an owner instead of a manager. invite and invitee_types are not configurable; adding configs for them will produce an error.