-
Notifications
You must be signed in to change notification settings - Fork 432
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
feat(core): schema and field deprecation #5489
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
Full Report@sanity/migrate
@sanity/diff
@sanity/block-tools
@sanity/types
sanity/desk
@sanity/portable-text-editor
@sanity/mutator
@sanity/cli
@sanity/schema/_internal
@sanity/util/paths
sanity/router
@sanity/util/legacyDateFormat
@sanity/schema
sanity/structure
sanity/cli
@sanity/vision
@sanity/util/fs
sanity/_internal
sanity/_internalBrowser
@sanity/util/content
sanity
|
Component Testing Report Updated Jan 23, 2024 4:21 PM (UTC)
|
819d84d
to
90429e9
Compare
@juice49 could you look at the unit tests and commit snapshots if it looks good |
packages/sanity/src/_internal/cli/actions/graphql/gen3/generateTypeQueries.ts
Show resolved
Hide resolved
80ae5ee
to
731fac3
Compare
28761f5
to
4831d7d
Compare
47125d3
to
e3737e3
Compare
* feat(core): add badge for deprecated fields * fix(core): update styles for deprecated message
1d44f7d
to
2424565
Compare
…computing available document creation types
2424565
to
3043ec3
Compare
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.
Looks great! I had one non-blocking comment in there to consider regarding types but I'd say go to go otherwise.
* feat(schema): add `deprecated` property to schema definitions * feat(schema): add `DeprecatedSchemaType` type and `isDeprecatedSchemaType` type guard * test(schema): add deprecations to test schema * chore: add debug schema for deprecated fields * chore(debug): update deprecated debug schema * feat(core): add deprecated reason in the fields * feat(desk): add document panel banner for deprecated document types * feat(core): remove templates derived from deprecated document types from global document creation menu * fix(core): deprecation existence check * feat(cli): add support for GraphQL deprecations * feat(cli): inherit GraphQL field deprecations from parent type * feat(cli): extend GraphQL field deprecation inheritance to document interface fields * test(cli): update snapshot * chore(structure): add todo * refactor(structure): move `DeprecatedDocumentTypeBanner` component into `banners` directory * refactor(structure): adopt standard `Banner` component * feat(core): add badge for deprecated fields (#5470) * feat(core): add badge for deprecated fields * fix(core): update styles for deprecated message * chore(test): add tests for deprecated fields (#5484) * chore(test): add test for deprecated document * test(cli): update snapshot * test(cli): update snapshot * chore(test-studio): add example for deprecation of object type * feat: pass depreacted info to object types (#5516) * test(core): add test for named deprecated array * fix(core): remove unnecessary fragment * refactor(core): separate deprecation and search query filtering when computing available document creation types * fix(core): fixes alignment for boolean input * feat(types): establish first-class `DeprecatedSchemaType` type --------- Co-authored-by: Ash <[email protected]> Co-authored-by: Bjørge Næss <[email protected]>
Description
This PR adds ability to deprecate documents and fields.
Example to deprecate a document
Example to deprecate a field
The deprecation messages also gets carried over to the graphql schema
What to review
Test for deprecated fields
Test for deprecated document
Notes for release