Could not parse schema: UrlParse("locations", InvalidUri(InvalidFormat))

When I start router on local, I get the below error message (“ERROR could not parse schema: UrlParse(“locations”, InvalidUri(InvalidFormat))”)

Can you help me to troubleshoot the problem?

2023-01-11T22:59:46.736726Z INFO Apollo Router v1.7.0 // (c) Apollo Graph, Inc. // Licensed as ELv2 (Apollo FAQ on Licensing under Elastic License v2 (ELv2) - Apollo GraphQL Docs)
2023-01-11T22:59:46.736785Z INFO Anonymous usage data is gathered to inform Apollo product development. See Privacy and data collection - Apollo GraphQL Docs for more info.
2023-01-11T22:59:46.989953Z ERROR could not parse schema: UrlParse(“locations”, InvalidUri(InvalidFormat))

Local OS: Windows 10

I believe this error means that the URL of the subgraph named “locations” was invalid. Are you able to share the config file which you were using that produced this error?

Hi @dylan I am experiencing similar issue, which config would you like, can you specify? I used the ODYSSEY-VOYAGE-1 repo.

Error :
2023-01-12T21:34:03.018119Z INFO Apollo Router v1.8.0 // (c) Apollo Graph, Inc. // Licensed as ELv2 (Apollo FAQ on Licensing under Elastic License v2 (ELv2) - Apollo GraphQL Docs)
2023-01-12T21:34:03.018827Z INFO Anonymous usage data is gathered to inform Apollo product development. See Privacy and data collection - Apollo GraphQL Docs for more info.
2023-01-12T21:34:03.632398Z ERROR could not parse schema: UrlParse(“locations”, InvalidUri(InvalidAuthority))

@dylan , which config file?
I am stuck in the step 08 of the Voyage Part1 tutorial
https://www.apollographql.com/tutorials/voyage-part1/08-router-configuration-and-uplink

I have resolved my issue, I had a typo in the localhost url in the command that I was publishing the subgraphs @Yasar can you have a look, I put them in the package.json in the root directory for easy use, instead of writing the whole thing all the time.
Example : yarn rover subgraph publish <APOLLO_GRAPH_REF> --name locations --schema ./subgraph-locations/locations.graphql --routing-url http://localhost:4001

1 Like

@Stavros_Kollias , You are right. I had a typo in the url as well.
Thank you very much :pray:

1 Like

I meant the YAML config for Router, which, you don’t need if you’re using APOLLO_GRAPH_REF. I’m glad you were able to sort out the issue!

By the way, if you encounter any more problems, you can get faster feedback from us by joining our new Discord :grinning: