API Reference
    Preparing search index...

    Type Alias RouteHandlerOptions<TParams, T, R, TSource>

    Options for registering a resolver event

    type RouteHandlerOptions<
        TParams,
        T extends boolean,
        R extends boolean,
        TSource = Record<string, unknown> | null,
    > = {
        aggregate?: T;
        fieldName: string;
        handler:
            | BatchResolverHandler<TParams, TSource, T>
            | ResolverHandler<TParams>;
        throwOnError?: R;
        typeName: string;
    }

    Type Parameters

    • TParams
    • T extends boolean
    • R extends boolean
    • TSource = Record<string, unknown> | null
    Index

    Properties

    aggregate?: T

    Whether the route handler will send all the events to the route handler at once or one by one

    true
    
    fieldName: string

    The name of the field to be registered

    The handler function to be called when the event is received

    throwOnError?: R

    Whether to raise an error if the handler fails

    false
    
    typeName: string

    The name of the type to be registered