Testing locally with ngrok
Using ngrok is a common practice to properly test against your local
environment with an API Connect for GraphQL as a Service
schema and endpoint.
About this task
ngrok is a tool that opens a tunnel to a web service running on your local
machine, so that it can be accessed over the internet. This can be useful for testing your GraphQL
endpoints during development, by hosting them directly on your local machine.
ngrok exposes your local server (e.g. localhost:3000) to the
public Internet. You can sign
up for a free account.
Attention:
ngrok exposes your local environment beyond the firewall and
NAT of your machine. Even though the environment is exposed through a secure HTTP connection, there
can be security vulnerabilities if the public address of your ngrok endpoint is not
secured by authorization. Adding Authorization headers to your database or endpoint
is recommended to properly test with ngrok.