Provide NX graph (and affected graph) in the devkit #23409
Replies: 2 comments 3 replies
-
I don't have any issues with exposing a programmatic API but I'm curious about some use cases people see for this programmatic API. I could imagine some myself but I'd like to hear from others. Also, what do you think the API would look like? Would it take the same options as the |
Beta Was this translation helpful? Give feedback.
-
In this case, I am using the I did this before having Regarding the API, I guess the same as the CLI would make sense to me 😄 |
Beta Was this translation helpful? Give feedback.
-
Description
I would like to have access to the NX graph and the affected graph in the devkit. If possible, also other utility functions such as "projects that match XYZ"-
Motivation
I would avoid writing code such as
(unnecessarily calling the NX CLI from a Node project) and instead, import already-existing functions like this:
Suggested Implementation
I already have access to some functions. In a discord message, I mentioned that I am able to do:
however, this is not public API, so I can't rely on a stability from such a function.
You guys would only have to ensure that some of these utility functions that you already use to build the graph, get projects that match patterns, etc, are public API and that you inform of changes when breaking them.
Alternate Implementations
Duplicating existing functions in the devkit, and making these more stable.
Beta Was this translation helpful? Give feedback.
All reactions