Class BulkOperationTrait

Bulk Operation Trait adds global GraphQL interface interface for bulk operation usage Usage:

traits:
- type: bulk_operation

Provides global mutation bulkOperation that triggers related step machine

Hierarchy

Constructors

Properties

Trait instance configuration.

_global: boolean = false

Whether this is a global (not bound to any specific schema item) trait instance.

_type?: "bulk_operation"

Trait type.

baseDirectory: string
graphqlSchemaManager: GraphQLSchemaManager
logger: Logger
stepFunctionsClient: StepFunctions
schemaModified: boolean = false

Methods

  • Retrieves the status of a bulk operation.

    Async

    Returns

    A promise that resolves to an object representing the status of the bulk operation.

    Throws

    Throws an error if the JWT secret is not configured, if the JWT verification fails, or if there is an error retrieving the operation status.

    Parameters

    • _parent: unknown

      The parent object. This is a standard parameter in GraphQL resolvers.

    • args: Record<string, any>

      An object containing the arguments passed to the function.

    Returns Promise<BulkOperationStatus>

  • Load and validate the GraphQL mutation for a predefined bulk operation.

    Returns

    An Operation object representing loaded operation.

    Throws

    An Error if the operation cannot be loaded and validated.

    Parameters

    • operationName: string

      The name of the predefined bulk operation to load.

    Returns Promise<Operation>

  • This is where any GraphQL mutations entries that are required by the trait are added.

    Returns

    The GraphQL schema string, including our additions.

    Parameters

    • schemaString: string

      The original GraphQL schema string.

    Returns string

  • This method is triggered when a trait callback has been activated

    Type Parameters

    • RT = any

    • Payload = any

    Parameters

    • callbackName: string

      This is the name of the callback function to call.

    • datasourceWrapper: DataSourceWrapper

      References to the Graph Hanlder

    • data: TraitDataObject<RT, Payload, Promise<any>>

      Request data passed along as part of the request.

    Returns Promise<RT>

  • This is where any GraphQL mutations entries that are required by the trait are added.

    Returns

    The GraphQL schema string, including our additions.

    Parameters

    • schemaString: string

      The original GraphQL schema string.

    Returns string

Generated using TypeDoc