Skip to content

Incorrect playground endpoint in apollo-server-lambda #4687

@danielpatrickdotdev

Description

@danielpatrickdotdev

When deploying apollo-server-lambda as per the readme, the url used by the playground is wrong when using the API gateway execute-api domain.

I believe this is caused by the change made in #1527.

This example payload for this type of event includes a url of https://70ixmpl4fl.execute-api.ca-central-1.amazonaws.com/Prod/, with event.requestContext.path of /Prod/ (the stage name). The event.path is /. Clearly in this case using event.path would be incorrect.

When using an API gateway with a custom domain, the values for event.requestContext.path and event.path are identical.

I'd be happy to submit a PR to fix this, but it would be good to understand why this was changed in the first place first as I don't want to break anything.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions