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

chore: change type name of AsyncNode to Node #1757

Merged
merged 4 commits into from
Jan 8, 2024

Conversation

fregataa
Copy link
Member

@fregataa fregataa commented Dec 4, 2023

React compiler use the name of type whether it is Node or not.
It raises error if the name is not Node.

Checklist: (if applicable)

  • Milestone metadata specifying the target backport version

@fregataa fregataa added this to the 24.03 milestone Dec 4, 2023
@fregataa fregataa requested review from yomybaby and rapsealk December 4, 2023 08:30
@fregataa fregataa self-assigned this Dec 4, 2023
@github-actions github-actions bot added comp:manager Related to Manager component size:XS ~10 LoC labels Dec 4, 2023
Copy link
Member

@rapsealk rapsealk left a comment

Choose a reason for hiding this comment

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

Isn't it Relay compiler that throws an error?

@@ -0,0 +1 @@
Change type name of AsyncNode to Node since React compiler use it to determine relay node.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Change type name of AsyncNode to Node since React compiler use it to determine relay node.
Change type name of AsyncNode to Node since Relay compiler use it to determine relay node.

@fregataa fregataa requested a review from rapsealk December 4, 2023 11:49
@rapsealk
Copy link
Member

Tested with:

// ModelCardModal.tsx
  const model_card = useFragment(
    graphql`
      fragment ModelCardModalFragment on ModelCard
      @refetchable(queryName: "ModelCardModalRefetchQuery") {
        id
        name
      }
    `,
    modelCardModalFrgmt,
  );

Refs: https://relay.dev/graphql/objectidentification.htm#sec-Node-Interface

Copy link
Member

@rapsealk rapsealk left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@yomybaby yomybaby left a comment

Choose a reason for hiding this comment

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

LGTM 🚀 Thank you.

@fregataa fregataa added this pull request to the merge queue Jan 8, 2024
Merged via the queue into main with commit 8ab9493 Jan 8, 2024
25 checks passed
@fregataa fregataa deleted the chore/change-asyncnode-type-name-to-node branch January 8, 2024 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:manager Related to Manager component size:XS ~10 LoC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants