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

Edits to docs for async start #5044

Merged
merged 2 commits into from
Mar 22, 2021
Merged

Conversation

StephenBarlow
Copy link
Contributor

No description provided.

Copy link
Member

@glasser glasser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably just revert the change to the paragraph I commented on? Or improve it some other way?

#### `applyMiddleware`

Connects Apollo Server to the HTTP framework of a Node.js middleware library, such as hapi or express.

You call this method instead of [`listen`](#listen) if you're using an `apollo-server-{integration}` package. You are highly recommended to [`await server.start()`](#start) before calling this method.
You call this method instead of [`listen`](#listen) if you're using an `apollo-server-{integration}` package. Unless you're using a "serverless" integration, always call [`await server.start()`](#start) _before_ calling this method.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The serverless integrations don't have applyMiddleware; they have createHandler. (Confusingly there is at least one non-serverless integration that has createHandler too.) This whole section is kinda weird because it attempts to document integration-specific methods in a generic way. We probably should at some point rethink how we document (or fail to document) the integration libraries.

@glasser glasser merged commit 1a29a7e into glasser/async-start Mar 22, 2021
@glasser glasser deleted the sb/async-start-edits branch March 22, 2021 20:31
glasser pushed a commit that referenced this pull request Mar 22, 2021
Co-authored-by: Stephen Barlow <stephenbarlow@APOLLO-StephenBarlow.attlocal.net>
Co-authored-by: Stephen Barlow <stephenbarlow@apollo-stephenbarlow.gateway.sonic.net>
@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.

2 participants