-
-
Notifications
You must be signed in to change notification settings - Fork 820
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
No unnecessary inline fragment spreads for union types in federation and link dependencies #5913
Conversation
🦋 Changeset detectedLatest commit: b27ae86 The changes in this PR will be included in the next version bump. This PR includes changesets to release 31 packages
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 |
✅ Benchmark Results
|
🚀 Snapshot Release (
|
Package | Version | Info |
---|---|---|
@graphql-tools/batch-delegate |
9.0.1-alpha-20240222154539-b27ae8605c354eed2b24844a475c8889ccc90dfb |
npm ↗︎ unpkg ↗︎ |
@graphql-tools/batch-execute |
9.0.4-alpha-20240222154539-b27ae8605c354eed2b24844a475c8889ccc90dfb |
npm ↗︎ unpkg ↗︎ |
@graphql-tools/delegate |
10.0.4-alpha-20240222154539-b27ae8605c354eed2b24844a475c8889ccc90dfb |
npm ↗︎ unpkg ↗︎ |
@graphql-tools/executor |
1.2.1-alpha-20240222154539-b27ae8605c354eed2b24844a475c8889ccc90dfb |
npm ↗︎ unpkg ↗︎ |
@graphql-tools/executor-apollo-link |
1.0.1-alpha-20240222154539-b27ae8605c354eed2b24844a475c8889ccc90dfb |
npm ↗︎ unpkg ↗︎ |
@graphql-tools/executor-envelop |
2.0.4-alpha-20240222154539-b27ae8605c354eed2b24844a475c8889ccc90dfb |
npm ↗︎ unpkg ↗︎ |
@graphql-tools/executor-graphql-ws |
1.1.2-alpha-20240222154539-b27ae8605c354eed2b24844a475c8889ccc90dfb |
npm ↗︎ unpkg ↗︎ |
@graphql-tools/executor-http |
1.0.9-alpha-20240222154539-b27ae8605c354eed2b24844a475c8889ccc90dfb |
npm ↗︎ unpkg ↗︎ |
@graphql-tools/executor-legacy-ws |
1.0.6-alpha-20240222154539-b27ae8605c354eed2b24844a475c8889ccc90dfb |
npm ↗︎ unpkg ↗︎ |
@graphql-tools/executor-urql-exchange |
1.0.1-alpha-20240222154539-b27ae8605c354eed2b24844a475c8889ccc90dfb |
npm ↗︎ unpkg ↗︎ |
@graphql-tools/executor-yoga |
2.0.4-alpha-20240222154539-b27ae8605c354eed2b24844a475c8889ccc90dfb |
npm ↗︎ unpkg ↗︎ |
@graphql-tools/federation |
1.1.17-alpha-20240222154539-b27ae8605c354eed2b24844a475c8889ccc90dfb |
npm ↗︎ unpkg ↗︎ |
graphql-tools |
9.0.1-alpha-20240222154539-b27ae8605c354eed2b24844a475c8889ccc90dfb |
npm ↗︎ unpkg ↗︎ |
@graphql-tools/import |
7.0.1-alpha-20240222154539-b27ae8605c354eed2b24844a475c8889ccc90dfb |
npm ↗︎ unpkg ↗︎ |
@graphql-tools/links |
9.0.1-alpha-20240222154539-b27ae8605c354eed2b24844a475c8889ccc90dfb |
npm ↗︎ unpkg ↗︎ |
@graphql-tools/load |
8.0.2-alpha-20240222154539-b27ae8605c354eed2b24844a475c8889ccc90dfb |
npm ↗︎ unpkg ↗︎ |
@graphql-tools/apollo-engine-loader |
8.0.1-alpha-20240222154539-b27ae8605c354eed2b24844a475c8889ccc90dfb |
npm ↗︎ unpkg ↗︎ |
@graphql-tools/github-loader |
8.0.1-alpha-20240222154539-b27ae8605c354eed2b24844a475c8889ccc90dfb |
npm ↗︎ unpkg ↗︎ |
@graphql-tools/graphql-file-loader |
8.0.1-alpha-20240222154539-b27ae8605c354eed2b24844a475c8889ccc90dfb |
npm ↗︎ unpkg ↗︎ |
@graphql-tools/json-file-loader |
8.0.1-alpha-20240222154539-b27ae8605c354eed2b24844a475c8889ccc90dfb |
npm ↗︎ unpkg ↗︎ |
@graphql-tools/module-loader |
8.0.1-alpha-20240222154539-b27ae8605c354eed2b24844a475c8889ccc90dfb |
npm ↗︎ unpkg ↗︎ |
@graphql-tools/prisma-loader |
8.0.3-alpha-20240222154539-b27ae8605c354eed2b24844a475c8889ccc90dfb |
npm ↗︎ unpkg ↗︎ |
@graphql-tools/url-loader |
8.0.2-alpha-20240222154539-b27ae8605c354eed2b24844a475c8889ccc90dfb |
npm ↗︎ unpkg ↗︎ |
@graphql-tools/merge |
9.0.3-alpha-20240222154539-b27ae8605c354eed2b24844a475c8889ccc90dfb |
npm ↗︎ unpkg ↗︎ |
@graphql-tools/mock |
9.0.2-alpha-20240222154539-b27ae8605c354eed2b24844a475c8889ccc90dfb |
npm ↗︎ unpkg ↗︎ |
@graphql-tools/node-require |
7.0.2-alpha-20240222154539-b27ae8605c354eed2b24844a475c8889ccc90dfb |
npm ↗︎ unpkg ↗︎ |
@graphql-tools/relay-operation-optimizer |
7.0.1-alpha-20240222154539-b27ae8605c354eed2b24844a475c8889ccc90dfb |
npm ↗︎ unpkg ↗︎ |
@graphql-tools/resolvers-composition |
7.0.1-alpha-20240222154539-b27ae8605c354eed2b24844a475c8889ccc90dfb |
npm ↗︎ unpkg ↗︎ |
@graphql-tools/schema |
10.0.3-alpha-20240222154539-b27ae8605c354eed2b24844a475c8889ccc90dfb |
npm ↗︎ unpkg ↗︎ |
@graphql-tools/stitch |
9.0.5-alpha-20240222154539-b27ae8605c354eed2b24844a475c8889ccc90dfb |
npm ↗︎ unpkg ↗︎ |
@graphql-tools/stitching-directives |
3.0.1-alpha-20240222154539-b27ae8605c354eed2b24844a475c8889ccc90dfb |
npm ↗︎ unpkg ↗︎ |
@graphql-tools/wrap |
10.0.2-alpha-20240222154539-b27ae8605c354eed2b24844a475c8889ccc90dfb |
npm ↗︎ unpkg ↗︎ |
💻 Website PreviewThe latest changes are available as preview in: https://d9ff513e.graphql-tools.pages.dev |
b61790c
to
e8fd678
Compare
type = isNonNullType(type) ? type.ofType : type; | ||
if ( | ||
type != null && | ||
isAbstractType(getNamedType(type)) && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to spread on abstract type ?
Shouldn't the spread be inside the selection set of this type, to spread inline fragment for each final types possible ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not 100%, I just know that we need to spread interfaces and the _Entity union. Omitting either (or both) fails a bunch of data-fetching tests. Maybe @ardatan can shine some light. :D
Link dependencies
Many of the dependencies in the monorepo are not linked and therefore not updated on new releases. They should! (Note that I haven't checked all deps, only those affected by this PR.)
Inline fragment spread