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

refactor(typegen): use typenode to lookup referencing type names #7038

Merged
merged 1 commit into from
Jul 2, 2024

Conversation

sgulseth
Copy link
Member

Description

When we generate the types we hold the generated type name in case it's referenced later. This was needed primarily because we, earlier, wanted to support multiple queries having the same name etc. Since we now doesn't allow this, it's not a big case. However, in #6997 we need to later reference all the names by the type nodes.

What to review

Correctness: The outputted types should be 100% identical to the previous.

Testing

Tests should still pass, I added a test for the case where it's referencing a type node we haven't seen.

Notes for release

n/a - no notes needed

@sgulseth sgulseth requested a review from a team as a code owner June 27, 2024 21:53
Copy link

vercel bot commented Jun 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
page-building-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 27, 2024 9:57pm
performance-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 27, 2024 9:57pm
test-compiled-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 27, 2024 9:57pm
test-next-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 27, 2024 9:57pm
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 27, 2024 9:57pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Jun 27, 2024 9:57pm

Copy link
Contributor

No changes to documentation

Copy link
Contributor

Component Testing Report Updated Jun 27, 2024 10:06 PM (UTC)

File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 36s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 7s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 27s 6 0 0
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 32s 11 7 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 14s 6 0 0
formBuilder/inputs/PortableText/DisableFocusAndUnset.spec.tsx ✅ Passed (Inspect) 9s 3 0 0
formBuilder/inputs/PortableText/DragAndDrop.spec.tsx ✅ Passed (Inspect) 52s 1 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 36s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 1m 16s 21 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 1m 5s 18 0 0
formBuilder/inputs/PortableText/PresenceCursors.spec.tsx ✅ Passed (Inspect) 7s 3 9 0
formBuilder/inputs/PortableText/RangeDecoration.spec.tsx ✅ Passed (Inspect) 21s 9 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 15s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 1m 6s 21 0 0
formBuilder/tree-editing/TreeEditing.spec.tsx ✅ Passed (Inspect) 51s 18 0 0

Copy link

@jonabc jonabc left a comment

Choose a reason for hiding this comment

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

😄 I don't understand the full context given in the PR writeup, but the code changes look accurate 👍

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.

2 participants