Is it possible to use local routing_url with Apollo Router instead of Apollo Gateway?
Query error:
HTTP fetch failed from 'users':
HTTP fetch failed from 'users':
error trying to connect:
dns error:
no record found for Query { name: Name(\"users.\"),
query_type: AAAA, query_class: IN }
Im running to start:
./router -s supergraph.yaml --dev
supergraph.yaml:
federation_version: =2.6.0
subgraphs:
users:
routing_url: http://users
schema:
file: ./src/subgraph-users/schema.graphql
With Apollo Gateway this code works:
const gateway = new ApolloGateway({
supergraphSdl: readFileSync("./supergraph.graphql", "utf8"),
buildService: ({ url }) => {
if (url === 'http://users') {
return usersSubgraph;
}
else {
return new RemoteGraphQLDataSource({url})
}
}
})