Closed kornalius closed 11 months ago
I found my issue. The problem lied in the global 'setupInstance' method in the createPiniaClient. I re-creating the data like the following:
setupInstance(data: AnyData): AnyData {
return {
_id: undefined,
...data,
}
}
That was destroying the instance.
Hello,
I am working on an app that allows creating dynamic services and on the frontend side the store 'service:...' is created but its functionalities don't seem to be connected to the service.
In the createPiniaClient setup, I don't declare the dynamic services in the
services
section.I would like to be able to declare the stores to be used as regular services (on the backend the service exists).
If I do the following, it seems to create a
defaultService
but without being connected to the service on the backend.In the defaultService() in
create-pinia-client.ts
I see thatuseServiceInstance
should be called it does not seem to.Is there a way to create a connected service store with going through createPiniaClient?