I'm new to AWS Appsync and to GraphQL.
Previously, I used to create REST APIs in Python. I was always creating a GET
/health-check
endpoint, sending back, for example and among many other info, the API version number, easily parsed from the project descriptor pyproject.toml
file.
That helped me massively to maintain APIs: with a single GET
query in my browser, I was always able to instantly get if branch/version it was, the status of other services, etc. .
I want to do something similar with AWS Appsync / GraphQL and my IaC tool (Pulumi). Since I'm using IaC tool Pulumi in Python, I could still easily get the info I need and inject them in any resolver response template.
But if I create a resolver, should I create a corresponding health-check query itself in the GraphQL schema? When creating a resolver with a hardcoded JSON response, should it be associated with a GraphQL query in the schema, and if yes, how should that query in the schema look like?