When I try to fetch a customer including their customer group(s) I get a validation error on the server.
This is my call:
return await sdk.client
.fetch<{ customer: StoreCustomer }>(`/store/customers/me`, {
method: "GET",
query: {
fields: "*customer_group",
},
headers,
next,
})
.then(({ customer }) => customer)
.catch(() => null)
}
My backend throws an error:
error: Requested fields [customer_group] are not valid
What am I missing here? How else am I supposed to fetch a customers group from the storefront.
Is there an overview of all relations I can call for a specific entity? Would be great if this was typed and not simply a string