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

entity-based @defer preview.0 #212

Merged
merged 27 commits into from
Sep 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
2710334
router-alpha-defer2
prasek Jul 20, 2022
572caac
bump to latest router 0.15.1+ with experimental support for `@defer`
prasek Aug 12, 2022
c138214
slow deferred field in same subgraphs with two subgraph fetches
prasek Aug 18, 2022
212ccf2
apollo-client defer example from jpvajda
prasek Aug 19, 2022
2b7c3f2
updates for router v0.16.0 use of incremental path in defer response
prasek Aug 22, 2022
645b4cb
add incremental client rendering for deferred ProductVariation
prasek Aug 22, 2022
94d76f6
switch to stock router image for PR checks
prasek Aug 23, 2022
a5ad83e
bump to router-v1.0.0-alpha.0
prasek Aug 29, 2022
3dc7247
update to use `deferSpec=20220822` in `accept` header and latest AC
prasek Aug 30, 2022
6c69354
add router custom build of main
prasek Aug 31, 2022
b971607
add dockerized defer-ac on port 3000
prasek Aug 31, 2022
ee07133
add CI test for router main with smoke test 6
prasek Aug 31, 2022
58d0b6b
updated AC 3.7 beta build
prasek Aug 31, 2022
11a8a62
update to new Router 1.0 config format
prasek Aug 31, 2022
471dedc
merge from main
prasek Aug 31, 2022
81359e0
add defer smoke test with --compressed
prasek Sep 1, 2022
66c071d
add make docker-build-main-with-subgraphs-no-cache
prasek Sep 1, 2022
84b5a90
send correct deferSpec header for smoke test 7
prasek Sep 1, 2022
0c0ea37
`make run-router-main` with subgraphs on localhost ports
prasek Sep 1, 2022
72c5bb9
add async-compression patch
prasek Sep 1, 2022
816c0cb
fix router.yaml config for dockerized router-main
prasek Sep 1, 2022
209bd55
fix side-by-side loading
prasek Sep 2, 2022
426edd7
bump to router-v1.0.0-alpha.1
prasek Sep 3, 2022
d1e92d9
re-enable normal CI and defer introspection detect
prasek Sep 3, 2022
b81a47b
CI router custom main build on push only
prasek Sep 3, 2022
34f2c8b
Merge remote-tracking branch 'origin/main' into defer
prasek Sep 3, 2022
a4d0faf
remove debug from custom image CI
prasek Sep 3, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main-router-custom-image.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: CI Router Custom Image
on:
push:
pull_request:
branches: [ main ]
schedule:
- cron: '30 7 * * *'
Expand Down
66 changes: 66 additions & 0 deletions .github/workflows/main-router-custom-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: CI Router Custom Main
on:
push:
branches: [ main ]
schedule:
- cron: '30 7 * * *'
workflow_dispatch:

jobs:
ci-docker-local:
name: CI Router Custom Main
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
-
name: install rover
run: |
echo ---------------------------------------------------------------
echo rover - installing ...
echo ---------------------------------------------------------------
curl -sSL https://rover.apollo.dev/nix/latest | sh -s -- --elv2-license accept
echo "$HOME/.rover/bin" >> ${GITHUB_PATH}
-
name: update docker-compose
run: |
which docker-compose && exit 0 || true
echo ---------------------------------------------------------------
echo docker-compose - installing ...
echo ---------------------------------------------------------------
BIN_DIR=$HOME/.docker-compose/bin
FILE=$BIN_DIR/docker-compose
mkdir -p $BIN_DIR
set -x
curl -L --fail https://github.com/docker/compose/releases/download/1.29.1/docker-compose-`uname -s`-`uname -m` -o $FILE
chmod +x $FILE
echo "downloaded $($FILE --version)"
echo "$BIN_DIR" >> ${GITHUB_PATH}
set +x
echo ---------------------------------------------------------------
-
name: check tools
run: |
echo ---------------------------------------------------------------
( set -x; which rover )
echo "$(rover --version)"
echo ---------------------------------------------------------------
( set -x; which docker-compose )
echo "$(docker-compose --version)"
echo ---------------------------------------------------------------
- name: make supergraph
run: |
make supergraph
cat supergraph.graphql
- name: docker-compose build
run: |
( set -x; docker-compose -f docker-compose.router-custom-main.yml build --no-cache --pull --parallel --progress plain )
- name: docker-compose up -d
run: |
( set -x; docker-compose -f docker-compose.router-custom-main.yml up -d )
sleep 10
docker-compose -f docker-compose.router-custom-main.yml logs
- name: smoke test
run: .scripts/smoke.sh 4000
- name: docker-compose down
run: docker-compose -f docker-compose.router-custom-main.yml down
45 changes: 45 additions & 0 deletions .scripts/smoke-defer-compressed.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/bin/bash

echo "====================="
echo "Defer returns chunked responses without --compressed"
echo "====================="
( set -x; curl -i -X POST http://localhost:4000/ \
-H 'accept: multipart/mixed; deferSpec=20220824, application/json' \
-H 'content-type: application/json' \
--data-raw '{"operationName":"deferVariation","variables":{},"query":"query deferVariation { allProducts { ...MyFragment @defer sku id } } fragment MyFragment on Product { variation { name } }"}')
echo "----------------------"
printf "done.\n\n"
sleep 2

echo "====================="
echo "Defer returns chunked responses with --compressed"
echo "====================="
( set -x; curl --compressed -i -X POST http://localhost:4000/ \
-H 'accept: multipart/mixed; deferSpec=20220824, application/json' \
-H 'content-type: application/json' \
--data-raw '{"operationName":"deferVariation","variables":{},"query":"query deferVariation { allProducts { ...MyFragment @defer sku id } } fragment MyFragment on Product { variation { name } }"}')
echo "----------------------"
printf "done.\n\n"
sleep 2

echo "====================="
echo "Defer with trailing __typename without --compressed"
echo "====================="
( set -x; curl -i -X POST http://localhost:4000/ \
-H 'accept: multipart/mixed; deferSpec=20220824, application/json' \
-H 'content-type: application/json' \
--data-raw '{"operationName":"deferVariation","variables":{},"query":"query deferVariation { allProducts { ...MyFragment @defer sku id __typename } } fragment MyFragment on Product { variation { name __typename } __typename }"}')
echo "----------------------"
printf "done.\n\n"
sleep 2

echo "====================="
echo "Defer with trailing __typename with --compressed"
echo "====================="
( set -x; curl --compressed -i -X POST http://localhost:4000/ \
-H 'accept: multipart/mixed; deferSpec=20220824, application/json' \
-H 'content-type: application/json' \
--data-raw '{"operationName":"deferVariation","variables":{},"query":"query deferVariation { allProducts { ...MyFragment @defer sku id __typename } } fragment MyFragment on Product { variation { name __typename } __typename }"}')
echo "----------------------"
printf "done.\n\n"
sleep 2
Loading