apollo-server icon indicating copy to clipboard operation
apollo-server copied to clipboard

Add calls to `startApolloServer` in docs examples

Open trevor-scheer opened this issue 2 years ago • 4 comments

These examples don't work "out-of-the-box". To some, it might not be obvious that the startApolloServer function must be called to take effect.

Fixes #6464

trevor-scheer avatar May 23 '22 18:05 trevor-scheer

Deploy Preview for apollo-server-docs ready!

Name Link
Latest commit 4b0f010759bce66ca1bbc5d317a4ad082df49ca9
Latest deploy log https://app.netlify.com/sites/apollo-server-docs/deploys/628bd75a79cf07000861ef74
Deploy Preview https://deploy-preview-6465--apollo-server-docs.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

netlify[bot] avatar May 23 '22 18:05 netlify[bot]

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 4b0f010759bce66ca1bbc5d317a4ad082df49ca9:

Sandbox Source
Apollo Server Typescript Configuration
Apollo Server Configuration

codesandbox-ci[bot] avatar May 23 '22 18:05 codesandbox-ci[bot]

Took a whole army of complaints to simply update your documentation with one line of code.
You Apollo guys even closed my issue a few days ago, asking me for code when i specifically told them that their documentation was all failing. ONE LINE OF CODE. I want to be more of as a**hole right now, but there are always other alternatives to pages with "Selecting Package to use" with dead instructions. Just add a 'Dead liftoff ' as well to the docs. Am done with this 'tool'

R0N1n-dev avatar May 24 '22 05:05 R0N1n-dev

It is unfortunate that "how do you call an async function from the top level of a file?" isn't a simple question with a single simple answer in the Node ecosystem, but that's the world we live in.

glasser avatar May 24 '22 05:05 glasser

@rkoron007 have we decided we're comfortable with top-level await in examples? I think you made similar changes in other docsets.

glasser avatar Oct 19 '22 00:10 glasser

We are comfortable with top-level awaits in the docs now! So, I think the move here is to remove these unnecessary startApolloServer functions and instead insert this note on pages where we currently use top-level awaits. That way, folks know how to enable top-level await if they haven't done so already.

I can make a PR for that @trevor-scheer if you agree that sounds like the way to move forward.

rkoron007 avatar Oct 31 '22 21:10 rkoron007

Sounds great @rkoron007! Will you close this one out when you do that please?

trevor-scheer avatar Oct 31 '22 23:10 trevor-scheer

Closing this one in favor of https://github.com/apollographql/apollo-server/pull/7124

rkoron007 avatar Nov 03 '22 18:11 rkoron007