Protected Optional _configTrait instance configuration.
Protected _globalWhether this is a global (not bound to any specific schema item) trait instance.
Optional _relationshipProtected Optional _typeTrait type.
Protected configPrivate dataPrivate dbPrivate graphqlPrivate schemaImplements alterUnions.
Adds a FeedSource union with all the possible feed source types defined in the trait configuration.
Note that enabling this trait on multiple schema types is not supported, and doing so will cause the union to be declared multiple times.
GraphQL resolver to get an entity object from the entity_id and
entity_type properties.
GraphQL resolver to get entity from optional variables group_uuid and group_label
GraphQL resolver to get a user object from the user_uuid UUID.
Attaches Trait callbacks to schema item hooks.
GraphQL resolver to list the user's feed messages.
Makes this Trait instance global.
Use the preDelete hook to clean up the deleted user's feed from DynamoDB.
Implement this.
Used by traits for non user accessible entities
The UUID of vertex being deleted.
Datasource wrapper object.
The context of the user on whose behalf the call is being made.
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.
This method is used to retrieve additions to the GraphQL schema and to register the callbacks associated to the Vertex.
GraphQL schema with trait schema appended.
Existing GraphQL schema.
String name of the source vertex that the trait is connected to (not used here)
Optional relationship: null | objectJSON Object of the relationship, can be null where trait is not attached to a relationship.
Configuration setter.
The new configuration.
GraphQL mutation resolver to update the last read position of the user's feed.
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
Feed Trait adds global GraphQL Feeds query field listing user's feed messages.
Usage:
The 'sources' configuration option specifies which entity types may be be referenced by an feed message. These will be used to build the FeedSource union type. If omitted, the entity type to which the trait is attached will be used (normally this should be the User entity).