Next.js Discord

Discord Forum

500: Only absolute URLs

Unanswered
West African Lion posted this in #help-forum
Open in Discord
Avatar
West African LionOP
This is probably a beginner mistake. I have an app at crud-with-forms.vercel.app. I'm doing GraphQL queries and mutations using server on a separate file in my components, since the page.tsx is using client. Everything works locally. When I deploy only the queries will work correctly and the mutations keep returning 500. I only have one page route. But there's something going wrong when posting form data from that page. Anyone else run into this before?

10 Replies

Avatar
What is your code?
and are there logs in vercel
Avatar
West African LionOP
Hey thanks, yes my code is on Github: https://github.com/ryanjames1729/crud-with-forms. I using the runtime logs in Vercel to find the 500 error.
Image
Line 108 makes the function call to the async function that is included in my Results.tsx file.
Image
//Results.tsx file shown
Image
Avatar
How is graphql configured
Avatar
West African LionOP
@!=tgt I'm using Hygraph, already setup the public endpoint and tokens that are in the .env.local file and added those to Netlify environment variables.
Avatar
does the public endpoint include a hostname or is it just the relative path?
Avatar
West African LionOP