pocketbase / js-sdk

PocketBase JavaScript SDK
https://www.npmjs.com/package/pocketbase
MIT License
2.17k stars 127 forks source link

Missing Auto Completion Realtime - Fields, Filter, Expand #296

Closed tobiasbenkner closed 5 months ago

tobiasbenkner commented 5 months ago

Thanks for creating Pocketbase. I really enjoy to work with it.

I came across the realtime subscriptions options fields, filter and expand. https://github.com/pocketbase/pocketbase/releases/tag/v0.20.0-rc.

I just want to point out that

Therefore people don't know about this cool feature.

ganigeorgiev commented 5 months ago

It is mentioned in the documentation (there is both example with the options topic query param and comment about "other options like expand, custom headers, etc." in the SDK examples). I'll consider making it more clear in the near future, but other tasks are with higher priority right now (the documentation will have to be updated anyway after the refactoring).

About the autocompletion - testing with Sublime and the LSP TypeScript plugin it works correctly for me. Make sure that your editor doesn't have cache for some older version of the SDK. For the TS definition see also https://github.com/pocketbase/js-sdk/blob/master/src/services/RecordService.ts#L120.