Skip to content

Commit

Permalink
refactor(core): globalDocumentReference format to use ':' instead of '/'
Browse files Browse the repository at this point in the history
  • Loading branch information
skogsmaskin committed Jan 30, 2025
1 parent 4c8dd09 commit b04f688
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export function GlobalDocumentReferenceInput(props: GlobalDocumentReferenceInput
onChange(
set({
_type: schemaType.name,
_ref: `${schemaType.resourceType}/${schemaType.resourceId}/${getPublishedId(id)}`,
_ref: `${schemaType.resourceType}:${schemaType.resourceId}:${getPublishedId(id)}`,
_weak: schemaType.weak,
// persist _key between mutations if the value is in an array
_key: value?._key,
Expand Down Expand Up @@ -139,7 +139,7 @@ export function GlobalDocumentReferenceInput(props: GlobalDocumentReferenceInput
return null
}

const [, , _id] = value._ref.split('/', 3)
const [, , _id] = value._ref.split(':', 3)
return {_id}
}, [value])

Expand Down

0 comments on commit b04f688

Please sign in to comment.