[▲ Vercel Community](/) · [Categories](/categories) · [Latest](/latest) · [Top](/top) · [Live](/live)

[Help](/c/help/9)

# ERR_INVALID_URL on Hygraph Content API

83 views · 2 likes · 4 posts


Naufalhaidar12342 (@naufalhaidar12342) · 2024-08-03

<!-- Be sure to include all detail needed to let others see the same problem -->
Hello ! This is my second post on `ERR_INVALID_URL` error thrown when building Next.js project that use Hygraph API. My previous post could be found here: [ERR_INVALID_URL with Hygraph Content API](https://community.vercel.com/t/err-invalid-url-on-hygraph-public-api-stored-in-environment-variable/213)

Since I forgot to reply to that post, I have to create new one. I talked to Hygraph team, even performing simple test where me and one member of Hygraph team will create nextjs project and use the same Hygraph Content API (Hygraph High Performance API) to fetch data. 

We tested it both locally and deployed to Vercel. The result was the same: when the project executed/ran  in local machine, the Hygraph API stored environment variable could be parsed by nextjs and successfully fetched the data. But if the same project pushed to be deployed on Vercel, it will throw the `ERR_INVALID_URL` . The Hygraph team suggest there might be something wrong with the `next-server`

If anyone has found the solution without the workaround shown in my previous post, feel free to reply it here. Thank you!


Pauline P. Narvas (@pawlean) · 2024-08-05

Hi, @naufalhaidar12342!

Thanks for your patience with this. :pray: 

Could you raise an issue directly in the [Next.js repository](https://github.com/vercel/next.js/issues)?


Naufalhaidar12342 (@naufalhaidar12342) · 2024-08-05 · ♥ 1

Hi @pawlean , thank you for patiently answering my duplicate issues 😭

You can check the newly opened issue in next.js github here: 
[next.js issues](https://github.com/vercel/next.js/issues/68539)

Hope I could get some solution to it, and maybe future developers too!


Pauline P. Narvas (@pawlean) · 2024-08-05 · ♥ 1

Thanks, @naufalhaidar12342! :pray: Appreciate the care for other developers too. I'll keep an eye out on your issue!