Class LambdaClient

Hierarchy

  • LambdaClient

Implements

Constructors

Properties

Methods

  • Parameters

    • graphqlLambdaFunctionName: string
    • payload: any

    Returns Promise<any>

  • This function is used to create the request payload that we will call the GraphQL backend with.

    Parameters

    • userContext: ContextUser

      The user context that the call will be made on behalf of

    • query: string

      The GraphQL string query

    • variables: Record<string, unknown>

    Returns {
        body: string;
        headers: {
            content-type: string;
        };
        httpMethod: string;
        path: string;
        requestContext: {
            authorizer: {
                claims: {
                    cognito:groups: string[];
                    iss: string;
                    sub: string;
                };
            };
        };
    }

    • body: string
    • headers: {
          content-type: string;
      }
      • content-type: string
    • httpMethod: string
    • path: string
    • requestContext: {
          authorizer: {
              claims: {
                  cognito:groups: string[];
                  iss: string;
                  sub: string;
              };
          };
      }
      • authorizer: {
            claims: {
                cognito:groups: string[];
                iss: string;
                sub: string;
            };
        }
        • claims: {
              cognito:groups: string[];
              iss: string;
              sub: string;
          }
          • cognito:groups: string[]
          • iss: string
          • sub: string
  • This method is used to verify that all the environment variables required to create the user context have been configured.

    Returns

    a valid Context user

    Parameters

    • actor: Actor

      An object representing the user making the request

    Returns ContextUser

Generated using TypeDoc