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

Improve tests and utils around public schema #118

Merged
merged 5 commits into from
Mar 27, 2025
Merged

Conversation

kamilkisiela
Copy link
Contributor

@kamilkisiela kamilkisiela commented Mar 27, 2025

I added the link utils Jeff created (extractLinkImplementations).
I changed the logic of transformSupergraphToPublicSchema and containsSupergraphSpec to reuse what is defined in src/specifications. The supergraph to public schema transformation supports now aliasing.

I added quite a lot of tests to check if the publicSdl we're producing is correct.
The assertCompositionSuccess function that is used in tests, builds a GraphQLSchema instance from the publicSdl (in case of Apollo it uses their own api to achieve the same thing) and validates it. This way we can assume the publicSdl is valid and executable.

Copy link
Contributor

github-actions bot commented Mar 27, 2025

🚀 Snapshot Release (alpha)

The latest changes of this PR are available as alpha on npm (based on the declared changesets):

Package Version Info
@theguild/federation-composition 0.16.0-alpha-20250327145011-00366c9d9e0e2a8066253470651fff8f75f7d928 npm ↗︎ unpkg ↗︎

@kamilkisiela kamilkisiela merged commit 63f2224 into main Mar 27, 2025
4 checks passed
@kamilkisiela kamilkisiela deleted the kamil-public-schema branch March 27, 2025 15:01
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

1 participant