Parameters are shown as isolated nodes in graph view; not recognized as related resources
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 991
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 196
Description
- [x] I have searched the existing issues
**Describe the bug**
There is an interesting side effect after the recent change to make parameters and connection strings visible in the dashboard. Parameters are not appearing as "related resources" in the graph view—they are shown as isolated nodes ("islands"). See the attached image for a visual example.
It appears that various resources need to call `WithReferenceRelationship` to ensure parameters are correctly recognized as related resources and properly connected in the graph view.
```c#
var builder = DistributedApplication.CreateBuilder(args);
var pwd = builder.AddParameter("pwd", secret: true);
var cache = builder.AddRedis("cache").WithPassword(pwd);
var apiService = builder.AddProject("apiservice")
.WithHttpHealthCheck("/health");
builder.AddProject("webfrontend")
.WithExternalHttpEndpoints()
.WithHttpHealthCheck("/health")
.WithReference(cache)
.WaitFor(cache)
.WithReference(apiService)
.WaitFor(apiService);
builder.Build().Run();
```
**Expected Behavior**
Parameters should be connected as related resources where relevant, rather than appearing as isolated nodes.
**Steps To Reproduce**
1. Make parameters visible in the dashboard.
2. Observe the graph view: parameters are not connected to other resources.
3. Notice that parameters are displayed as isolated nodes.
**Exceptions (if any)**
_None provided._
**Anything else?**
- See attached image for example:
- Suggested Solution: Update the relevant resources to call `WithReferenceRelationship` with the appropriate parameters so that the graph view accurately reflects their relationships.
Contributor guide
Assessment
This issue has not been assessed yet.