Closed einarpersson closed 8 months ago
I've looked at this before and I think it would be possible for the basic case, but expansions are very flexible and can multiple expansions, multiple levels deep. See https://pocketbase.io/docs/working-with-relations/#expanding-relations
I'm open to PRs that can handle all these cases, but unfortunately it's not something I'm motivated to add.
Is it possible to keep this issue open? Would be a great feature and I'm sure someone would pick this up eventually.
I don't think this will ever be possible with the current sdk. If something changes I'm happy to revisit, but im trying to keep on top of the issues and don't want to keep them open forever.
With https://github.com/patmood/pocketbase-typegen/pull/82 a lot became simpler.
But, currently I still have to do
since I am expanding the record in this case.
But it would be nice if it was just
and that
contacts
string
but rather"contacts" | "..."
, i.e. that only validHow much work is it to get this to work? Can it be done without changes in the pocketbase js-sdk? If not, what changes would make it feasible?
(or are there limitations that will prevent this from ever happening?)