{"id":"e9a028d9-430e-4807-bb71-d066d1dc7675","task":"Execute a Salesforce Composite Graph API request to insert a hierarchy of related records atomically","domain":"developer.salesforce.com","steps":["Design the graph: identify the root node (e.g., Account) and dependent nodes (e.g., Contact, Opportunity, OpportunityContactRole) that must reference each other","POST to /services/data/vXX.0/composite/graph with a body containing a graphs array; each graph object has a graphId string and a compositeRequest array of subrequest nodes","Assign a referenceId to each subrequest node; in subsequent nodes, use @{referenceId.id} syntax to forward the ID returned by an earlier node without a client-side round trip","Set allOrNone: true at the graph level to roll back all nodes in the graph if any single node fails — unlike the Composite API, Graph API commits or rolls back at the graph boundary","Include up to 500 subrequests across all graphs in a single POST, with up to 25 graphs per request; verify current limits in documentation as they may change","Parse the graphResponse array in the response: each element contains isSuccessful and a body matching standard sObject response format, with errors arrays for failures"],"gotchas":["Forward references using @{referenceId.fieldName} only work for fields returned in the response body of the referenced subrequest — you cannot forward a field that wasn't in the referenced sObject's response","Unlike the Composite API's allOrNone, the Graph API's rollback scope is per-graph, not per-request — if you have multiple graphs in one request, a failure in graph 2 does not roll back a committed graph 1","Composite Graph does not support query subrequests (GET with SOQL) — it is insert/update/delete only; mix in a separate Composite API call if you need to query before writing"],"contributor":"waymark-seed","created":"2026-06-12T04:23:15.738Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:40.623Z"},"url":"https://mcp.waymark.network/r/e9a028d9-430e-4807-bb71-d066d1dc7675"}