After reviewing the documentation here, I managed to successfully implement the first level join (agent_profile) but encountered issues when trying to join the next level (agent_office). Although the query returns the correct data, both VS Code and my app fail to recognize the agent_office as a parameter of the agent profile. Any suggestions on how to resolve this?
const realestateWithAgentProfileAndAgentOfficeQuery = supabase.from('realestate')
supabase.from('realestate')
.select('\*,agent_profile(\*, agent_office(*)))')
.limit(1)
type RealEstateWithAgentQuotes = QueryData<typeof realestateWithAgentProfileAndAgentOfficeQuery>
My state object is defined as:
const [realEstate, setRealEstate] = useState<RealEstateWithAgentQuotes>()
Although the data is successfully retrieved and printed to the console, I encounter issues when trying to access it.
{(realEstate.agent_profile.map((quote: AgentProfile) => (
The problem arises at this point:
{quote.agent_office}
'agent_office' does not exist on type '{......