-
Notifications
You must be signed in to change notification settings - Fork 60
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
Conversation
e68acfe
to
2df5e1f
Compare
66ee3a4
to
17a315d
Compare
@prasek it looks like some tests are failing on this PR
also when running locally in studio it looks like DeliveryEstimates and allProducts aren't available in the schema |
Actually I figured out what was wrong with that query, so that's not a issue anymore. |
c304195
to
dc5c446
Compare
router/custom-image/acme_router.yaml
Outdated
@@ -3,6 +3,7 @@ server: | |||
cors: | |||
origins: | |||
- https://studio.apollographql.com | |||
experimental_defer_support: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just adding a comment for reference, to test this with a local instance of a apollo graphql studio / explorer you need to add this as you'll get cors issues on the client side.
allow_any_origin: true # added to allow for local development testing
Experimental defer support has shipped in router 0.14.0 🎉 it s worth noting the CORS default behavior wrt headers has changed in 0.14.0, so you probably want to set allow_any_header to true if you have allow_any_origin set to true This configuration should get you started: server:
experimental_defer_support: true
listen: 0.0.0.0:4000
cors:
allow_any_origin: true
allow_any_header: true |
78feeb6
to
7825e63
Compare
Signed-off-by: Phil Prasek <prasek@gmail.com>
Signed-off-by: Phil Prasek <prasek@gmail.com>
Signed-off-by: Phil Prasek <prasek@gmail.com>
Signed-off-by: Phil Prasek <prasek@gmail.com>
Signed-off-by: Phil Prasek <prasek@gmail.com>
Signed-off-by: Phil Prasek <prasek@gmail.com>
Signed-off-by: Phil Prasek <prasek@gmail.com>
Signed-off-by: Phil Prasek <prasek@gmail.com>
Signed-off-by: Phil Prasek <prasek@gmail.com>
Signed-off-by: Phil Prasek <prasek@gmail.com>
Signed-off-by: Phil Prasek <prasek@gmail.com>
Signed-off-by: Phil Prasek <prasek@gmail.com>
Signed-off-by: Phil Prasek <prasek@gmail.com>
Signed-off-by: Phil Prasek <prasek@gmail.com>
Signed-off-by: Phil Prasek <prasek@gmail.com>
Signed-off-by: Phil Prasek <prasek@gmail.com>
Signed-off-by: Phil Prasek <prasek@gmail.com>
Signed-off-by: Phil Prasek <prasek@gmail.com>
@prasek now that this is merged in, is it best to demo from |
@jpvajda yes PR 212 has been updated & merged to use router-1.0.0-alpha.1
to demo you can use https://github.com/apollographql/supergraph-demo-fed2
If you want to use Router main:
|
@prasek I'm getting the follow errors on main JVs-Apollo-Macbook:supergraph-demo-fed2 jvajda$ make docker-up-local-router
docker-compose -f docker-compose.router.yml up -d
Traceback (most recent call last):
File "urllib3/connectionpool.py", line 670, in urlopen
File "urllib3/connectionpool.py", line 392, in _make_request
File "http/client.py", line 1255, in request
File "http/client.py", line 1301, in _send_request
File "http/client.py", line 1250, in endheaders
File "http/client.py", line 1010, in _send_output
File "http/client.py", line 950, in send
File "docker/transport/unixconn.py", line 43, in connect
FileNotFoundError: [Errno 2] No such file or directory
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "requests/adapters.py", line 439, in send
File "urllib3/connectionpool.py", line 726, in urlopen
File "urllib3/util/retry.py", line 410, in increment
File "urllib3/packages/six.py", line 734, in reraise
File "urllib3/connectionpool.py", line 670, in urlopen
File "urllib3/connectionpool.py", line 392, in _make_request
File "http/client.py", line 1255, in request
File "http/client.py", line 1301, in _send_request
File "http/client.py", line 1250, in endheaders
File "http/client.py", line 1010, in _send_output
File "http/client.py", line 950, in send
File "docker/transport/unixconn.py", line 43, in connect
urllib3.exceptions.ProtocolError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "docker/api/client.py", line 214, in _retrieve_server_version
File "docker/api/daemon.py", line 181, in version
File "docker/utils/decorators.py", line 46, in inner
File "docker/api/client.py", line 237, in _get
File "requests/sessions.py", line 543, in get
File "requests/sessions.py", line 530, in request
File "requests/sessions.py", line 643, in send
File "requests/adapters.py", line 498, in send
requests.exceptions.ConnectionError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "docker-compose", line 3, in <module>
File "compose/cli/main.py", line 81, in main
File "compose/cli/main.py", line 200, in perform_command
File "compose/cli/command.py", line 60, in project_from_options
File "compose/cli/command.py", line 152, in get_project
File "compose/cli/docker_client.py", line 41, in get_client
File "compose/cli/docker_client.py", line 170, in docker_client
File "docker/api/client.py", line 197, in __init__
File "docker/api/client.py", line 221, in _retrieve_server_version
docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
[3573] Failed to execute script docker-compose
make: *** [docker-up-local-router] Error 255 THEN JVs-Apollo-Macbook:supergraph-demo-fed2 jvajda$ make smoke
curl -X POST http://localhost:4000/ -H Content-Type: application/json --data { "query": "query { __schema { directives { name }}}" }
ERROR: CURL ERROR 7: Failed to connect() to host or proxy.
make: *** [smoke] Error 1
JVs-Apollo-Macbook:supergraph-demo-fed2 jvajda$ |
How to get started with entity-based
@defer
previewRun the all-in-one-demo
@defer
preview.0 #212open the defer Apollo Client React demo app at http://localhost:3000/
shutdown
Run only the Router and subgraphs - without the AC demo client
open Sandbox at http://localhost:4000/
make additional queries like this
Signed-off-by: Phil Prasek prasek@gmail.com