Commit 927de67
authored
fix(nexus/graph): query instance detail across all selected graphs (#1051)
The Composer's instance inspector returned empty detail when an individual's
triples were split across multiple selected graphs. The whole pipeline was
single-graph: InstanceDrawer looped over the selected graphs and stopped at the
first one returning any triple (e.g. the graph holding rdf:type), so data
properties and relations living in another graph were never fetched.
Make instance-detail span every selected graph in one request:
- DiscoveryInstanceDetailRequest accepts graph_uris: list[str] (graph_uri kept
for back-compat); a model_validator merges + dedupes and errors if none given.
- _discover_instance_detail_sync expands all four VALUES ?g {...} clauses to
range over every graph; add relation dedup since multi-graph can surface the
same triple from two graphs.
- FastAPI handler forwards payload.graph_uris.
- fetchInstanceDetail takes graphUris: string[] and posts graph_uris.
- InstanceDrawer makes one multi-graph call instead of the first-wins loop.1 parent 6ec420e commit 927de67
5 files changed
Lines changed: 60 additions & 32 deletions
File tree
- libs/naas-abi/naas_abi/apps/nexus/apps
- api/app/services/graph
- adapters/primary
- web/src
- components/graph/explore
- lib/graph-query
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
939 | 939 | | |
940 | 940 | | |
941 | 941 | | |
942 | | - | |
| 942 | + | |
943 | 943 | | |
944 | 944 | | |
945 | 945 | | |
| |||
Lines changed: 18 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
247 | | - | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
248 | 253 | | |
249 | 254 | | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
250 | 266 | | |
251 | 267 | | |
252 | 268 | | |
| |||
Lines changed: 20 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2747 | 2747 | | |
2748 | 2748 | | |
2749 | 2749 | | |
2750 | | - | |
| 2750 | + | |
2751 | 2751 | | |
2752 | 2752 | | |
2753 | 2753 | | |
2754 | | - | |
| 2754 | + | |
2755 | 2755 | | |
2756 | 2756 | | |
2757 | 2757 | | |
2758 | 2758 | | |
2759 | 2759 | | |
2760 | | - | |
| 2760 | + | |
2761 | 2761 | | |
2762 | 2762 | | |
2763 | 2763 | | |
2764 | 2764 | | |
| 2765 | + | |
| 2766 | + | |
| 2767 | + | |
| 2768 | + | |
2765 | 2769 | | |
2766 | 2770 | | |
2767 | 2771 | | |
| |||
2770 | 2774 | | |
2771 | 2775 | | |
2772 | 2776 | | |
2773 | | - | |
| 2777 | + | |
2774 | 2778 | | |
2775 | 2779 | | |
2776 | 2780 | | |
| |||
2796 | 2800 | | |
2797 | 2801 | | |
2798 | 2802 | | |
2799 | | - | |
| 2803 | + | |
2800 | 2804 | | |
2801 | 2805 | | |
2802 | 2806 | | |
| |||
2831 | 2835 | | |
2832 | 2836 | | |
2833 | 2837 | | |
| 2838 | + | |
2834 | 2839 | | |
2835 | 2840 | | |
2836 | 2841 | | |
2837 | 2842 | | |
2838 | | - | |
| 2843 | + | |
2839 | 2844 | | |
2840 | 2845 | | |
2841 | 2846 | | |
| |||
2855 | 2860 | | |
2856 | 2861 | | |
2857 | 2862 | | |
| 2863 | + | |
| 2864 | + | |
| 2865 | + | |
| 2866 | + | |
2858 | 2867 | | |
2859 | 2868 | | |
2860 | 2869 | | |
| |||
2878 | 2887 | | |
2879 | 2888 | | |
2880 | 2889 | | |
2881 | | - | |
| 2890 | + | |
2882 | 2891 | | |
2883 | 2892 | | |
2884 | 2893 | | |
| |||
2898 | 2907 | | |
2899 | 2908 | | |
2900 | 2909 | | |
| 2910 | + | |
| 2911 | + | |
| 2912 | + | |
| 2913 | + | |
2901 | 2914 | | |
2902 | 2915 | | |
2903 | 2916 | | |
| |||
Lines changed: 13 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
121 | 122 | | |
122 | 123 | | |
123 | 124 | | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
141 | 135 | | |
142 | 136 | | |
143 | 137 | | |
| |||
Lines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
180 | | - | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
181 | 186 | | |
182 | 187 | | |
183 | | - | |
| 188 | + | |
184 | 189 | | |
185 | 190 | | |
186 | 191 | | |
187 | 192 | | |
188 | | - | |
| 193 | + | |
189 | 194 | | |
190 | 195 | | |
191 | 196 | | |
| |||
0 commit comments