@lucern/graph-primitives 1.0.32 → 1.0.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -41,5 +41,5 @@
41
41
  "convex-validators",
42
42
  "proof-attestation"
43
43
  ],
44
- "signedAt": 1782351689326
44
+ "signedAt": 1782374417266
45
45
  }
@@ -1,4 +1,5 @@
1
1
  import { checkProjectAccess } from '@lucern/access-control/access';
2
+ import { generateUuidV7 } from '@lucern/contracts/ids';
2
3
  import { permissiveReturn } from '@lucern/contracts/schema-helpers/validators';
3
4
  import { v } from 'convex/values';
4
5
  import { unsafeConvexAnyApi } from '@lucern/contracts/convex/unsafeAnyApi';
@@ -1011,10 +1012,10 @@ async function applyOperationalLinkEffects(ctx, args) {
1011
1012
  if (questionNode && questionNode.nodeType === "question" && evidenceNode && evidenceNode.nodeType === "evidence" && questionNode.globalId && evidenceNode.globalId) {
1012
1013
  const existingEdge = await ctx.db.query("epistemicEdges").withIndex(
1013
1014
  "by_from_to",
1014
- (q) => q.eq("fromNodeId", evidenceNode._id).eq("toNodeId", questionNode._id)
1015
+ (q) => q.eq("fromNodeId", evidenceNode.globalId).eq("toNodeId", questionNode.globalId)
1015
1016
  ).first();
1016
1017
  if (!existingEdge) {
1017
- const globalId = `edge-derived_from-${evidenceNode._id}-${questionNode._id}-${Date.now()}`;
1018
+ const globalId = generateUuidV7();
1018
1019
  await ctx.scheduler.runAfter(0, internal.neo4jEdgeAPI.createEdge, {
1019
1020
  globalId,
1020
1021
  fromGlobalId: evidenceNode.globalId,