Skip to content

fix(tsgen): resolve the real GraphQL endpoint per region - #358

Open
naman-contentstack wants to merge 1 commit into
developmentfrom
fix/DX-10294
Open

fix(tsgen): resolve the real GraphQL endpoint per region#358
naman-contentstack wants to merge 1 commit into
developmentfrom
fix/DX-10294

Conversation

@naman-contentstack

Copy link
Copy Markdown
Contributor

Summary

  • GraphQL requests in csdx tsgen --api-type graphql reused the CDA (REST) host and a hardcoded region alias, so any non-default region got a 403 hitting a REST host with a GraphQL query.
  • Adds resolveGraphqlHost to resolve the region's actual GraphQL delivery endpoint (from stored region config, falling back to a canonical endpoint lookup by region name), failing with a clear error when a region has none configured instead of silently 403ing.

Test plan

  • npx jest test/unit/helper.test.ts — 35/35 passing, including new resolveGraphqlHost regression tests (AWS/AZURE/GCP × NA/EU/AU)
  • npx tsc --noEmit — clean

Jira: DX-10294

🤖 Generated with Claude Code

GraphQL requests reused the CDA (REST) host and a hardcoded region
alias, so any non-default region got a 403 hitting a REST host with a
GraphQL query. Resolve the region's actual GraphQL delivery endpoint
instead, failing with a clear error when a region has none configured.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@naman-contentstack
naman-contentstack requested a review from a team as a code owner August 24, 2026 11:42
@snyk-io

snyk-io Bot commented Aug 24, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@github-actions

Copy link
Copy Markdown

🔒 Security Scan Results

ℹ️ Note: Only vulnerabilities with available fixes (upgrades or patches) are counted toward thresholds.

Check Type Count (with fixes) Without fixes Threshold Result
🔴 Critical Severity 0 0 10 ✅ Passed
🟠 High Severity 0 0 25 ✅ Passed
🟡 Medium Severity 0 0 500 ✅ Passed
🔵 Low Severity 0 0 1000 ✅ Passed

⏱️ SLA Breach Summary

✅ No SLA breaches detected. All vulnerabilities are within acceptable time thresholds.

Severity Breaches (with fixes) Breaches (no fixes) SLA Threshold (with/no fixes) Status
🔴 Critical 0 0 15 / 30 days ✅ Passed
🟠 High 0 0 30 / 120 days ✅ Passed
🟡 Medium 0 0 90 / 365 days ✅ Passed
🔵 Low 0 0 180 / 365 days ✅ Passed

✅ BUILD PASSED - All security checks passed

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.

1 participant