export function getObjectId(obj: T | string | null): string | null export function getObjectId(obj: T | string): string export function getObjectId(obj: T | string | null): string | null { if (typeof obj === `string`) { return obj } else if (typeof obj?.id === `string`) { return obj.id } else { return null } } export function getObjectTypename(obj: T | string | null): string | null export function getObjectTypename(obj: T | string): string export function getObjectTypename(obj: T | string | null): string | null { if (typeof obj === `string`) { return obj } else if (typeof obj?.__typename === `string`) { return obj.__typename } else { return null } }