Yasar
January 11, 2023, 11:05pm
1
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
dylan
January 12, 2023, 4:57pm
2
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))
Yasar
January 13, 2023, 8:21am
4
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
Yasar
January 16, 2023, 1:13pm
6
@Stavros_Kollias , You are right. I had a typo in the url as well.
Thank you very much
1 Like
dylan
January 17, 2023, 6:35pm
7
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