@twilio/flex-sdk
    Preparing search index...

    Type Alias Resolver<TResult, TParent, TContext, TArgs>

    Resolver: (
        rootValue: TParent,
        args: TArgs,
        context: {
            client: FlexDataClient;
            phase: "exports" | "resolve";
            requestContext: TContext;
        },
        info: { field: FieldNode; fragmentMap: FragmentMap; path: Path },
    ) => TResult | Promise<TResult>

    A function that resolves the value for a single GraphQL field marked with @client.

    Resolver functions receive four parameters:

    • rootValue: The parent object containing the result from the resolver on the parent field
    • args: Arguments passed to the field
    • context: Contains requestContext, client, and phase properties
    • info: Information about the field being resolved

    Type Parameters

    • TResult = unknown

      The type of value returned by the resolver

    • TParent = unknown

      The type of the parent object

    • TContext = DefaultContext

      The type of the request context

    • TArgs = Record<string, unknown>

      The type of the field arguments

    Type Declaration

      • (
            rootValue: TParent,
            args: TArgs,
            context: {
                client: FlexDataClient;
                phase: "exports" | "resolve";
                requestContext: TContext;
            },
            info: { field: FieldNode; fragmentMap: FragmentMap; path: Path },
        ): TResult | Promise<TResult>
      • Parameters

        • rootValue: TParent
        • args: TArgs
        • context: {
              client: FlexDataClient;
              phase: "exports" | "resolve";
              requestContext: TContext;
          }
        • info: { field: FieldNode; fragmentMap: FragmentMap; path: Path }

        Returns TResult | Promise<TResult>

    const isLoggedInResolver: Resolver<boolean> = () => {
    return !!localStorage.getItem("token");
    };