I am a noob to React and have not used Javascript in 15 years. So end-user error I am suspecting.
Here are my questions and code.
1) How do I go about troubleshooting these types of issues in the future? 2) How do I hand off the variable to the query to be used by appysync? 3) How do I resolve the Error just in case I am way off on my assumption?
I did the ping and got back. "Ping request could not find host https://(appsync id).appsync-api.us-east-1.amazonaws.com/graphql. Please check the name and try again."
I went into AppSync and noticed that the API URL in my AppSync API and the API URL in the aws-export.js were both different. I changed the aws-export.js to match and confirmed that my APIKey is up-to-date. That seems to have fixed the first error. (on a side note: I did try to ping the good API URL that is working, and I received the same error. Do you know why that is?)
But I am still getting the second error. I know the page needs an input window and an onClick event button. But is there an easy way to pass the variable in the code while I am testing?
ok so you did not put the right URL you probably start from a tutorial, could you provide the link?
Richard Comito
ASKER
No. I was using a different AppSync URL for another API that I was switching over from. (I am not that much of a noob)
The problem was fixed when I noticed I was using the old URL that I had deleted, plus my API key was expired, so I needed to replace that.
I got the appsync working when I realized I was using the old URL(Thank you for that. I wasn't even thinking to look there.).
I just wanted to move on to ask for advice on troubleshooting React, AWS issues, and tips as I move forward.
I am DBA by trade and have been doing that for over twenty years. T-SQL, MS SQL Servers no problem.
React is a different story. I have been working with React for about six months, but that is along with learning AWS Control Tower, Amplify, Route 53, and ect .... So I cannot focus as well as I would like.
My Javascript is weak, but that is what I am working on. In the past, I used to build Ticketing systems in ASP Classic and VB. Yes, I am that old. I can remember when .net came out in 2007. So I do understand far more than I can express at times.
I did the ping and got back. "Ping request could not find host https://(appsync id).appsync-api.us-east-1.amazonaws.com/graphql. Please check the name and try again."
I went into AppSync and noticed that the API URL in my AppSync API and the API URL in the aws-export.js were both different. I changed the aws-export.js to match and confirmed that my APIKey is up-to-date. That seems to have fixed the first error.
(on a side note: I did try to ping the good API URL that is working, and I received the same error. Do you know why that is?)
But I am still getting the second error. I know the page needs an input window and an onClick event button. But is there an easy way to pass the variable in the code while I am testing?
Thank you again,
Rich