Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lambda, cloud functions: change default path back to / #5497

Merged
merged 1 commit into from Jul 16, 2021

Conversation

glasser
Copy link
Member

@glasser glasser commented Jul 16, 2021

In Apollo Server 2, none of the serverless integrations paid much
attention to the HTTP request path (other than for health checks). In
AS3 we rewrote the Lambda and GCF integrations on top of
apollo-server-express so they inherited ASE's behavior of only
responding under /graphql. This doesn't make that much sense for
serverless integrations, where paths are typically specified in the API
Gateway (etc) configuration, and where functions typically do one thing.
(Frankly, it doesn't make much sense for a default path to be built in
to the framework integrations either rather than letting you specify the
path when you attach the middleware to your app, but changing that in
AS3 would have been one backwards-incompatible change too many).

So we're going to change how AS3 works by saying that serverless
integrations serve on /. This is technically incompatible with 3.0.0
but hey, it just came out, and this is more compatible with AS2.

Improve some other docs while we're at it.

Fixes #5462.

In Apollo Server 2, none of the serverless integrations paid much
attention to the HTTP request path (other than for health checks).  In
AS3 we rewrote the Lambda and GCF integrations on top of
`apollo-server-express` so they inherited ASE's behavior of only
responding under `/graphql`. This doesn't make that much sense for
serverless integrations, where paths are typically specified in the API
Gateway (etc) configuration, and where functions typically do one thing.
(Frankly, it doesn't make much sense for a default path to be built in
to the framework integrations either rather than letting you specify the
path when you attach the middleware to your app, but changing that in
AS3 would have been one backwards-incompatible change too many).

So we're going to change how AS3 works by saying that serverless
integrations serve on `/`. This is technically incompatible with 3.0.0
but hey, it just came out, and this is more compatible with AS2.

Improve some other docs while we're at it.

Fixes #5472.
@glasser glasser added this to the MM-2021-07 milestone Jul 16, 2021
@glasser glasser merged commit 2a3dd2e into main Jul 16, 2021
@glasser glasser deleted the glasser/lambda-path branch July 16, 2021 22:35
@glasser
Copy link
Member Author

glasser commented Jul 16, 2021

Fix released in 3.0.1.

@hwillson hwillson removed this from the MM-2021-07 milestone Jul 29, 2021
@glasser glasser mentioned this pull request Oct 4, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

apollo-server-lambda: Root ("/") path breaks server
3 participants