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

filter deprecated fields in the explorer view #3607

Closed
wants to merge 5 commits into from
Closed

Conversation

beerose
Copy link
Contributor

@beerose beerose commented Dec 13, 2023

Background

Fixes #1580

With #3606 the filters section gets a bit crowded. I currently split it into two rows, but it may need a redesign for a long-term solution (especially since I suppose we may have more filters).

CleanShot 2023-12-13 at 22 55 53@2x

Description

Checklist

  • Input validation
  • Output encoding
  • Authentication management
  • Session management
  • Access control
  • Cryptographic practices
  • Error handling and logging
  • Data protection
  • Communication security
  • System configuration
  • Database security
  • File management
  • Memory management
  • Testing

Copy link

changeset-bot bot commented Dec 13, 2023

⚠️ No Changeset found

Latest commit: 3a6414f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

github-actions bot commented Dec 13, 2023

📚 Storybook Deployment

The latest changes are available as preview in: https://63bd9a3b.hive-storybook.pages.dev

Copy link
Contributor

github-actions bot commented Dec 13, 2023

🐋 This PR was built and pushed to the following Docker images (tag: 3a6414f3d3851a015e3cd286e7462dac472430b5):

Docker Bake metadata
{
"app": {
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:a67b1eaf0a44e9d8ad844301dc88ea4ff283f1fac96a2352b20d286861d82305",
    "size": 685
  },
  "containerimage.digest": "sha256:a67b1eaf0a44e9d8ad844301dc88ea4ff283f1fac96a2352b20d286861d82305",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/app:3a6414f3d3851a015e3cd286e7462dac472430b5,ghcr.io/kamilkisiela/graphql-hive/app:filter_deprecated"
},
"composition-federation-2": {
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:cb8ad30a1317d6d1918a33b7b7f003c916c167d9660e76bc3b91977b7e01f402",
    "size": 685
  },
  "containerimage.digest": "sha256:cb8ad30a1317d6d1918a33b7b7f003c916c167d9660e76bc3b91977b7e01f402",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/composition-federation-2:3a6414f3d3851a015e3cd286e7462dac472430b5,ghcr.io/kamilkisiela/graphql-hive/composition-federation-2:filter_deprecated"
},
"emails": {
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:cd30c7ec7246c189f81abc9ee48410606732ec269ac48502d4753f5a3a31b8eb",
    "size": 685
  },
  "containerimage.digest": "sha256:cd30c7ec7246c189f81abc9ee48410606732ec269ac48502d4753f5a3a31b8eb",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/emails:3a6414f3d3851a015e3cd286e7462dac472430b5,ghcr.io/kamilkisiela/graphql-hive/emails:filter_deprecated"
},
"policy": {
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:258c5e3cb0e1c5f5b0380103ae407629c07641f5e5c3c8f2041bd1cb6e03e00e",
    "size": 685
  },
  "containerimage.digest": "sha256:258c5e3cb0e1c5f5b0380103ae407629c07641f5e5c3c8f2041bd1cb6e03e00e",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/policy:3a6414f3d3851a015e3cd286e7462dac472430b5,ghcr.io/kamilkisiela/graphql-hive/policy:filter_deprecated"
},
"rate-limit": {
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:f051b28e8d6a70d107c4ddc5d72b72b8d34b1404a6a5ce505b33a400e620ed7e",
    "size": 685
  },
  "containerimage.digest": "sha256:f051b28e8d6a70d107c4ddc5d72b72b8d34b1404a6a5ce505b33a400e620ed7e",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/rate-limit:3a6414f3d3851a015e3cd286e7462dac472430b5,ghcr.io/kamilkisiela/graphql-hive/rate-limit:filter_deprecated"
},
"schema": {
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:145fe545f7f1220385c4a65ea99f0e1230cbb2a83c598f0cd70933a20692c6de",
    "size": 685
  },
  "containerimage.digest": "sha256:145fe545f7f1220385c4a65ea99f0e1230cbb2a83c598f0cd70933a20692c6de",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/schema:3a6414f3d3851a015e3cd286e7462dac472430b5,ghcr.io/kamilkisiela/graphql-hive/schema:filter_deprecated"
},
"server": {
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:d888c5e3f3c88f9158bf43ee9e80da9b14d769805397f03261bae9545183a3cf",
    "size": 685
  },
  "containerimage.digest": "sha256:d888c5e3f3c88f9158bf43ee9e80da9b14d769805397f03261bae9545183a3cf",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/server:3a6414f3d3851a015e3cd286e7462dac472430b5,ghcr.io/kamilkisiela/graphql-hive/server:filter_deprecated"
},
"storage": {
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:e4a67dbeb66f9d5028af23ce779b3f63dc5089fb91c3ea1a8f29ea275f5b9df0",
    "size": 685
  },
  "containerimage.digest": "sha256:e4a67dbeb66f9d5028af23ce779b3f63dc5089fb91c3ea1a8f29ea275f5b9df0",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/storage:3a6414f3d3851a015e3cd286e7462dac472430b5,ghcr.io/kamilkisiela/graphql-hive/storage:filter_deprecated"
},
"stripe-billing": {
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:598dc90fcbf68ca833980fb0a80aa5896c9e49df612859ee6313f5f556f408bf",
    "size": 685
  },
  "containerimage.digest": "sha256:598dc90fcbf68ca833980fb0a80aa5896c9e49df612859ee6313f5f556f408bf",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/stripe-billing:3a6414f3d3851a015e3cd286e7462dac472430b5,ghcr.io/kamilkisiela/graphql-hive/stripe-billing:filter_deprecated"
},
"tokens": {
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:133be72daa32e5fc4fc7fdf892f9b21ea039744e242452aed680de9855ecccb6",
    "size": 685
  },
  "containerimage.digest": "sha256:133be72daa32e5fc4fc7fdf892f9b21ea039744e242452aed680de9855ecccb6",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/tokens:3a6414f3d3851a015e3cd286e7462dac472430b5,ghcr.io/kamilkisiela/graphql-hive/tokens:filter_deprecated"
},
"usage": {
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:b7b63df41a465fba7ae23047120a8aefdc1b2232688dafb84284b3f75f7bbd5e",
    "size": 685
  },
  "containerimage.digest": "sha256:b7b63df41a465fba7ae23047120a8aefdc1b2232688dafb84284b3f75f7bbd5e",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/usage:3a6414f3d3851a015e3cd286e7462dac472430b5,ghcr.io/kamilkisiela/graphql-hive/usage:filter_deprecated"
},
"usage-estimator": {
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:45c9102ccefe81a1b7cca15afd4210adeb0e64fe4687a9ef88be93692d936df4",
    "size": 685
  },
  "containerimage.digest": "sha256:45c9102ccefe81a1b7cca15afd4210adeb0e64fe4687a9ef88be93692d936df4",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/usage-estimator:3a6414f3d3851a015e3cd286e7462dac472430b5,ghcr.io/kamilkisiela/graphql-hive/usage-estimator:filter_deprecated"
},
"usage-ingestor": {
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:854873fcdf1b6d20f899792e7caf7e1ce3a8f6f6b311c0642c2ad3638c874e66",
    "size": 685
  },
  "containerimage.digest": "sha256:854873fcdf1b6d20f899792e7caf7e1ce3a8f6f6b311c0642c2ad3638c874e66",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/usage-ingestor:3a6414f3d3851a015e3cd286e7462dac472430b5,ghcr.io/kamilkisiela/graphql-hive/usage-ingestor:filter_deprecated"
},
"webhooks": {
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:755b0e36f43036d19635683e5f33219c7b11a0d554d3abad0bf5730dea8bd277",
    "size": 685
  },
  "containerimage.digest": "sha256:755b0e36f43036d19635683e5f33219c7b11a0d554d3abad0bf5730dea8bd277",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/webhooks:3a6414f3d3851a015e3cd286e7462dac472430b5,ghcr.io/kamilkisiela/graphql-hive/webhooks:filter_deprecated"
}
}

@kamilkisiela
Copy link
Collaborator

In my opinion, we should present deprecated fields and types in a similar fashion to how the unused schema parts are display.
If we do a client-side filter to hide non-deprecated bits, then the page may be empty in some cases. One major issue with this approach is a situation where all root-level fields are non-deprecated and user won't be able to even navigate to deprecated parts of schema.

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.

Filter for @deprecated directive on Schema Explorer
2 participants