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

feat(query): map file to package #9174

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

NicholasLYang
Copy link
Contributor

Description

Adding some queries so you can go from a file to the package it's from, or even the packages that it affects.

Testing Instructions

Copy link

vercel bot commented Sep 20, 2024

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

Name Status Preview Comments Updated (UTC)
examples-nonmonorepo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 29, 2024 8:40pm
8 Skipped Deployments
Name Status Preview Comments Updated (UTC)
examples-basic-web ⬜️ Ignored (Inspect) Visit Preview Oct 29, 2024 8:40pm
examples-designsystem-docs ⬜️ Ignored (Inspect) Visit Preview Oct 29, 2024 8:40pm
examples-gatsby-web ⬜️ Ignored (Inspect) Visit Preview Oct 29, 2024 8:40pm
examples-kitchensink-blog ⬜️ Ignored (Inspect) Visit Preview Oct 29, 2024 8:40pm
examples-native-web ⬜️ Ignored (Inspect) Visit Preview Oct 29, 2024 8:40pm
examples-svelte-web ⬜️ Ignored (Inspect) Visit Preview Oct 29, 2024 8:40pm
examples-tailwind-web ⬜️ Ignored (Inspect) Visit Preview Oct 29, 2024 8:40pm
examples-vite-web ⬜️ Ignored (Inspect) Visit Preview Oct 29, 2024 8:40pm

}

#[derive(Union)]
enum PackageMapping {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Union types in GraphQL are pretty annoying. Maybe I should change this to just return all the packages? I'm a little worried that could be too much data.

Ok(Some(PackageMapping::All(_))) => Ok(self
.run
.pkg_dep_graph()
.packages()
Copy link
Member

Choose a reason for hiding this comment

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

Does this need to be sorted?

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.

3 participants