Skip to content

Conversation

yaacovCR
Copy link
Owner

@yaacovCR yaacovCR commented May 6, 2025

No description provided.

@yaacovCR yaacovCR requested a review from Copilot May 6, 2025 12:05
Copy link
Contributor

github-actions bot commented May 6, 2025

Hi @yaacovCR, I'm @github-actions bot happy to help you with this PR 👋

Supported commands

Please post this commands in separate comments and only one per comment:

  • @github-actions publish-pr-on-npm - Build package from this PR and publish it on NPM

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the transformation of selection sets to improve root field routing across subschemas. The changes include updating the transformation function from transformForTargetSubschema to transformSelectionSetForTargetSubschema, modifying the executor call and merging logic in transform.ts, and adjusting related utility functions and tests.

  • Updated transformSelectionSetForTargetSubschema.ts to focus solely on selection set transformation.
  • Revised transform.ts to remove operation-level transformation and introduce routing logic with a new filterGroupedFieldSet and groupedFieldSetToSelectionSet.
  • Adjusted completeValue.ts, buildTransformationContext.ts, and addNewLabels.ts along with test updates (including skipping some tests).

Reviewed Changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/transform/transformSelectionSetForTargetSubschema.ts Refactored transformation logic, now accepting selectionSet, fragments, parentType, targetSchema, and prefix.
src/transform/transform.ts Updated routing logic; replaced transformForTargetSubschema with transformSelectionSetForTargetSubschema and added filtering logic.
src/transform/groupedFieldSetToSelectionSet.ts New utility to convert grouped field sets into selection sets with defer support.
src/transform/completeValue.ts Updated to use superschema and remove argsWithNewLabels dependency.
src/transform/buildTransformationContext.ts Updated context building with fragment grouping using the new transformation function.
src/transform/addNewLabels.ts Adjusted signature by splitting operation and fragments.
tests files Various test adjustments and skipping of tests related to fragment arguments and oneof input.
cspell.yml, .changeset/silly-berries-retire.md Minor documentation and configuration updates.

@yaacovCR yaacovCR merged commit d26e9ed into main May 7, 2025
23 checks passed
@yaacovCR yaacovCR deleted the more branch May 7, 2025 18:05
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