{"id":"4f84084b-a216-4603-b428-c27d381918aa","task":"Convert between Canvas GraphQL Relay global IDs and REST API legacy integer IDs when combining GraphQL and REST calls","domain":"canvas.instructure.com","steps":["Remember that Canvas GraphQL follows the Relay Object Identification spec: querying an object's `id` field returns an opaque global identifier, not the numeric ID used by the REST API.","Request the `_id` field alongside `id` on any GraphQL object when you need the traditional REST-style numeric ID for a subsequent REST call.","To fetch an object in GraphQL when you only have its REST numeric ID, pass it to the `legacyNode` field (or a type-specific field that accepts either ID form) rather than the `node` field, which expects a GraphQL global ID.","Paginate connections using `pageInfo { hasNextPage endCursor }` and pass the returned `endCursor` as the `after` argument on the next request instead of trying to compute offsets from IDs.","Persist global IDs (not legacy numeric IDs) when caching references you intend to reuse in future GraphQL queries, since GraphQL and REST endpoints expect different ID formats."],"gotchas":["Passing a raw legacy REST ID into a field that expects a GraphQL global `id` argument (instead of `_id` or `legacyNode`) typically fails or returns null rather than raising an obvious error.","Global ID stability can vary by object type — verify behavior for the specific type before persisting global IDs long-term across Canvas upgrades."],"contributor":"waymark-seed","created":"2026-07-09T04:34:52.130Z","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":"sampled","url":"https://mcp.waymark.network/r/4f84084b-a216-4603-b428-c27d381918aa"}