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

fix(internal, cli-utils): Remove null cases from schema loaders, simplifying error handling #214

Merged
merged 6 commits into from
Apr 16, 2024

Conversation

kitten
Copy link
Member

@kitten kitten commented Apr 15, 2024

Summary

When applied, this change removes null cases from the schema loaders and replaces them with appropriate errors. Instead of having to handle missing schemas separately, the CLI now receives errors for each case where we previously fell back to returning a null result.

Set of changes

  • Remove null cases from SDL loader
  • Remove null case from URL loader
  • Update types
  • Update commands using schema loaders to remove null cases
  • Retry with NODE_TLS_REJECT_UNAUTHORIZED disabled to prevent TLS errors
    • We assume CA certificates are trusted in this case, and that it's the user's responsibility to define a URL that is “safe” to access for GraphQL requests. Since we rely on API-side info and no code is executed this should be fine.

Copy link

changeset-bot bot commented Apr 15, 2024

🦋 Changeset detected

Latest commit: 1741345

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@kitten kitten merged commit 611c174 into main Apr 16, 2024
2 checks passed
@kitten kitten deleted the fix/schema-loading-errors branch April 16, 2024 11:53
@github-actions github-actions bot mentioned this pull request Apr 16, 2024
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.

None yet

2 participants