feat(core/schema): extract global document references types#8973
feat(core/schema): extract global document references types#8973skogsmaskin wants to merge 5 commits intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||
|
No changes to documentation |
⚡️ Editor Performance ReportDeploying studio and running performance tests… |
|
Found out that |
b49da28 to
59022f0
Compare
| type: 'book', | ||
| }, | ||
| ], | ||
| type: 'globalDocumentReference', |
There was a problem hiding this comment.
This will need a fix on the Create side (both backend and frontend) so we ignore gdr fields there for now.
Ie, we would have to get that out first before this can be merged.
If left as is, Create form will render this as an object with whatever fields GDR type has (i think, or it will crash, idk).
Is GDR available in the lastest version of sanity package? I can do a quick discov
There was a problem hiding this comment.
@snorrees - it will go out with the release today. Was merged to next earlier today.
(I will will make the final adjustments to the AI-Assist Plugin btw as soon as I know the version number)
There was a problem hiding this comment.
@snorrees - to clarify my message above:
The unexposed GDR support will go out today, not this one :)
Ie, we would have to get that out first before this can be merged.
Yes. Noted.
59022f0 to
eb96415
Compare
| }, | ||
| { | ||
| "fieldName": "productReference", | ||
| "type": "GlobalDocumentReference", |
There was a problem hiding this comment.
afaict GlobalDocumentReference isn't declared anywhere? 🤔
There was a problem hiding this comment.
I think its a new core type.
@skogsmaskin its too late to remodel GDRs as just objects right? This was why assist blew up too right? And why auto updating studios with assist are gonna be in a bad way.
There was a problem hiding this comment.
Yeah; it's similar to "type": "CrossDatasetReference", which is how the GQL schema types end up loooking.
eb96415 to
d74cef9
Compare
📊 Playwright Test ReportThis report contains test results, including videos of failing tests. |
|
Hey @skogsmaskin what's the current status on this PR? Is it worth getting this into a shippable state or can we close this? |
d74cef9 to
c1c12d9
Compare
🧪 E2E Preview environment🔑 Environment Variables for Local TestingThis is the preview URL for the E2E tests: https://e2e-studio-baxjxnrov.sanity.dev To run the E2E tests locally, you can use the following environment variables, then run 💬 Remember to build the project first with |
c1c12d9 to
711d673
Compare
711d673 to
c945208
Compare
|
@snorrees - I see you have added some stuff touching upon this some time after this PR. Can you please have another look? @kristofferlund - I know you have been working lately with the schema types. Adding you as an reviewer on this. |
Yes, if we want correct typings on the global document reference type (schema and GraphQL), it's worth getting this in. It is up to date with |
sgulseth
left a comment
There was a problem hiding this comment.
I don't think this is what we can support at the moment. typegen is not aware of GDRs, and has no way of resolving the external schema. I think we first need to migrate typegen to use the new schema store. For now unknown is the only thing reasonable to return for GDRs
Right! Sounds like something that could take a while to get in place. @justshiv - feel free to close this if it's causing noise in the "Open PRs". But maybe we can keep the branch for future reference. |
Description
This will extract
globalDocumentReferencetypes withextractSchemaand.extractManifest.However I'm not sure about the implications of this as I don't know how too much about how those functions are used.
Please help me review this.
What to review
That introducing this new type in the output will not break stuff somewhere?
What about the GraphQL API?
Testing
Notes for release