Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add enhanced uncaught error logging, allow internal networking for API communication #1385

Merged
merged 7 commits into from
Dec 9, 2024

Conversation

efstajas
Copy link
Contributor

@efstajas efstajas commented Dec 6, 2024

Adds a new CODEGEN_GQL_URL env var (defaults to value of GQL_URL), which allows using the public API endpoint for codegen, but use an internal URL for actual app <> api communcation at runtime. This is necessary because railway private networking does not work at build time.

Also changes dripsQL to query the api proxy endpoint on localhost rather than BASE_URL, but only server-side in prod. This avoids network overhead when the server calls itself during SSR.

Lastly, adds console logging on uncaught exceptions (incl. Fetch failed), and adds a check for API being reachable to health endpoint.

Release plan:

  1. Set CODEGEN_GQL_URL to public GQL API URL (https)
  2. Merge this PR, let it deploy. App will continue talking to public API URL.
  3. Change GQL_URL to private GQL API URL (http) at port 8080.

Copy link

railway-app bot commented Dec 6, 2024

🚅 Previously deployed to Railway in the Drips App project. Environment has been deleted.

@efstajas efstajas merged commit a2a258d into main Dec 9, 2024
7 checks passed
@efstajas efstajas deleted the jason/talk-to-api-via-internal-networking branch December 9, 2024 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants