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

Hide @internal APIs from TypeScript consumers #1924

Merged
merged 13 commits into from
Jan 29, 2024
Merged

Hide @internal APIs from TypeScript consumers #1924

merged 13 commits into from
Jan 29, 2024

Conversation

benjie
Copy link
Member

@benjie benjie commented Jan 29, 2024

Description

Various of our APIs were marked with @internal and yet people were using them anyway; one risk with this is that we may break those APIs in future, but a more pressing issue is you may be using them incorrectly. For example, if you are accessing a steps dependencies from inside a plan resolver, you are likely doing something wrong - read https://benjie.dev/graphql/ancestors

🚨 This is a major change since it significantly reduces our exposed API.

Performance impact

Marginal, plan-time only.

Security impact

Marginal improvement, perhaps.

Checklist

  • My code matches the project's code style and yarn lint:fix passes.
  • I've added tests for the new feature, and yarn test passes.
  • I have detailed the new feature in the relevant documentation.
  • I have added this feature to 'Pending' in the RELEASE_NOTES.md file (if one exists).
  • If this is a breaking change I've explained why.

Related

  • Test pg-aggregates
  • Test pg-many-to-many
  • Test postgraphile-plugin-connection-filter
  • Test pg-omit-archived

…rked as `@internal`. This may result in a few errors where you're accessing things you oughtn't be, but also may hide some interfaces that should be exposed - please file an issue if an API you were dependent on has been removed from the TypeScript typings. If that API happens to be `step.dependencies`; you should first read this: https://benjie.dev/graphql/ancestors
Copy link

changeset-bot bot commented Jan 29, 2024

🦋 Changeset detected

Latest commit: 04bbd64

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

This PR includes changesets to release 17 packages
Name Type
graphile-build Patch
graphile-utils Patch
@dataplan/json Patch
@dataplan/pg Patch
grafast Patch
tamedevil Patch
pg-sql2 Patch
graphile-build-pg Patch
pgl Patch
postgraphile Patch
graphile Patch
@localrepo/grafast-bench Patch
@grafserv/persisted Patch
grafserv Patch
ruru-components Patch
@localrepo/grafast-website Patch
graphile-export Patch

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

@benjie benjie merged commit 504414c into main Jan 29, 2024
24 checks passed
@benjie benjie deleted the hide-internals branch January 29, 2024 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

1 participant