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

Added support for new incremental delivery format

Open nathan-knight opened this issue 1 year ago • 8 comments

The format for incremental delivery has been updated: https://github.com/graphql/defer-stream-wg/discussions/69

I have added the new fields and ensured they get transmitted if they are present. It should still work with the previous format.

It is released in [email protected], but I didn't want to disturb the existing integration test that uses it so I haven't added anything for it. In order to maintain the two in parallel the CI test would need to be duplicated to run with this version.

nathan-knight avatar Sep 26 '23 15:09 nathan-knight

@nathan-knight: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Apollo Contributor License Agreement here: https://contribute.apollographql.com/

apollo-cla avatar Sep 26 '23 15:09 apollo-cla

Deploy request for apollo-server-docs pending review.

Visit the deploys page to approve it

Name Link
Latest commit 31f074747088acc049df7f45bee1734b3d36c600

netlify[bot] avatar Sep 26 '23 15:09 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 31f074747088acc049df7f45bee1734b3d36c600:

Sandbox Source
Apollo Server Typescript Configuration
Apollo Server Configuration

codesandbox-ci[bot] avatar Sep 26 '23 15:09 codesandbox-ci[bot]

@nathan-knight thanks for putting this together. The support for this in Apollo Server is still considered experimental / subject to change for exactly this reason, so I would like the smoke and integration tests to be updated to use the new alpha as well.

I didn't look too closely, but I'd also like for the "polyfill" stuff to match the latest alpha rather than attempt to be compatible with both. i.e. if there's anything in those types we should remove that are no longer relevant let's do that (and maybe you already did, I haven't verified against the graphql-js types or looked too closely at the PR).

trevor-scheer avatar Sep 26 '23 22:09 trevor-scheer

@trevor-scheer I didn't remove the old logic but if removing support for 17.0.0-alpha.1 and 17.0.0-alpha.2 is an option then I can try my hand at updating the tests and removing the outdated parts

nathan-knight avatar Sep 26 '23 23:09 nathan-knight

@nathan-knight yeah I think that's ideal. Right now we reference an old canary build in various places, we should replace all references to those with [email protected] and update tests as necessary.

To run the @defer tests locally, you'll need to:

  • temporarily install [email protected] at the top level dev dependencies (using --force)
  • run tests with INCREMENTAL_DELIVERY_TESTS_ENABLED=t npm run test

OR

  • (after updating the canary tag in prepare.sh to [email protected]
  • run INCREMENTAL_DELIVERY_TESTS_ENABLED=t npm run test:smoke

Second option is less messy but the test output won't be as great.

trevor-scheer avatar Sep 26 '23 23:09 trevor-scheer

Any news about this PR?

Maxou44 avatar Nov 01 '23 09:11 Maxou44

What are the blockers on getting this merged?

u873838 avatar Aug 02 '24 00:08 u873838