graphql-hive: self-hosted federation supergraph CDN fetch 404
I’m following the directions here: https://the-guild.dev/graphql/hive/docs/get-started/apollo-federation#fetch-your-supergraph in combination with https://the-guild.dev/graphql/hive/docs/self-hosting/get-started. I’ve created a CDN access token in my project target, and using curl I get a 404. My project is a federation project, and I’m using the CDN url displayed with the Apollo Federation dropdown option selected: http://localhost:8082/artifacts/v1/47396693-70f6-4fb8-9427-e7af1643049e/supergraph
➜ hive curl -v -L -H "X-Hive-CDN-Key: hv2NGZjMTY1OGQtZWY5Zi00ZWM2LThjOWEtNzQ0ZTNmZDk5Mzg1OmE0M2Y1NjEyZjY2ZGFjNmUxNGQwMTc0YWZiZTU1NzYwYmYyZDYwMmY=" http://localhost:8082/artifacts/v1/47396693-70f6-4fb8-9427-e7af1643049e/supergraph
* Trying 127.0.0.1:8082...
* Connected to localhost (127.0.0.1) port 8082 (#0)
> GET /artifacts/v1/47396693-70f6-4fb8-9427-e7af1643049e/supergraph HTTP/1.1
> Host: localhost:8082
> User-Agent: curl/7.88.1
> Accept: */*
> X-Hive-CDN-Key: hv2NGZjMTY1OGQtZWY5Zi00ZWM2LThjOWEtNzQ0ZTNmZDk5Mzg1OmE0M2Y1NjEyZjY2ZGFjNmUxNGQwMTc0YWZiZTU1NzYwYmYyZDYwMmY=
>
< HTTP/1.1 404 Not Found
< vary: Origin
< access-control-allow-origin: *
< content-type: text/plain;charset=UTF-8
< content-length: 10
< Date: Tue, 08 Aug 2023 05:10:36 GMT
< Connection: keep-alive
< Keep-Alive: timeout=5
<
* Connection #0 to host localhost left intact
Not found.%
in the docker-compose logs, this is all I see:
hive-server-1 | {"level":30,"time":1691471470056,"pid":1,"hostname":"eb6affb4318c","msg":"[404] (::ffff:10.89.0.181) GET /artifacts/v1/47396693-70f6-4fb8-9427-e7af1643049e/supergraph"}
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 18 (1 by maintainers)
We allow to publish schema with composition errors but our system does not push Supergraph SDL and other artifacts to the CDN. The reason for it is that sometimes you want to introduce a new subgraph that breaks the composition or simply migrate things from one subgraph to another. Same applies to a supergraph being built from scratch. Let’s say you have 6 subgraphs and you want to publish them to GraphQL Hive. If we would reject composition errors, you would have to publish them in correct order or with modifications in subgraphs.