trustfall icon indicating copy to clipboard operation
trustfall copied to clipboard

Tutorial for implementing an adapter

Open janosimas opened this issue 1 year ago • 3 comments

Sorry if I missed it but is there a tutorial for implementing adapters and data sources?

janosimas avatar Sep 20 '23 10:09 janosimas

Not yet, unfortunately.

The first step is always writing a schema that describes your data and is sufficient for your intended queries. Assuming you're using Rust, trustfall_stubgen can generate all the boilerplate code structure you need, and will even write a test case for you that won't pass until you've replaced all the generated todo!() bits.

If you're open to contributing, we'd love a PR with a tutorial!

On Wed, Sep 20, 2023, 3:53 AM Jano Simas @.***> wrote:

Sorry if I missed it but is there a tutorial for implementing adapters and data sources?

— Reply to this email directly, view it on GitHub https://github.com/obi1kenobi/trustfall/issues/473, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAR5MSSVMZILWD32G2VRV7LX3LDJ7ANCNFSM6AAAAAA47WZDME . You are receiving this because you are subscribed to this thread.Message ID: @.***>

obi1kenobi avatar Sep 20 '23 19:09 obi1kenobi

Thanks for the suggestion.

Right now, my only use case is only curiosity, trying this will be in low priority in my list. After I get it to work, we can talk about a PR.

janosimas avatar Sep 21 '23 05:09 janosimas

Makes sense.

Also, I'm sure you've already seen the example adapters in the examples directory, right?

On Thu, Sep 21, 2023, 12:24 AM Jano Simas @.***> wrote:

Thanks for the suggestion.

Right now, my only use case is only curiosity, trying this will be in low priority in my list. After I get it to work, we can talk about a PR.

— Reply to this email directly, view it on GitHub https://github.com/obi1kenobi/trustfall/issues/473#issuecomment-1728874103, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAR5MSUARQD6SA55VMF7NULX3PFQZANCNFSM6AAAAAA47WZDME . You are receiving this because you commented.Message ID: @.***>

obi1kenobi avatar Sep 21 '23 06:09 obi1kenobi