Type: Function

Resolve a permanent id. Warning: this function may have side effects. Calling this function may start a reference resolve call to the CMS. Please refrain from calling this function with bogus data.

Output is one of the following:

  • If the permanent id is not resolved yet: {state: 'resolving'}

  • If the permanent id failed to resolve: {state:'error'}

  • If the permanent id is resolved:


map {
  state: 'done',
  value: map {
    target: 'the target',
    type: 'the reference type',
    metadata?: map {}


let $res := fonto:resolve-permanent-id($permanent-id)
return if ($res?state != "done") then "Loading..."
else "I resolved to " || $res?value?target


  1. permanentId


    Type: String

    The permanentId that is being resolved