Should source adaptors export their client so that Tina & the application can use the same communication channel?

I’m unclear if applications are supposed to manage data on their own (i.e, with Gatsby and their graphQL api) or if they should share the same client (thinking next and contentful).


You totally could do it that way, but there isn’t really a suggested approach exactly because different frameworks work in different ways. Gatsby provides the tools to manage your content so it’s pretty reasonable to use that, but if you’re using create-react-app then you can use the client for all data access.

So as a rule of thumb, do you think it should be a best practice to export the client in the adaptor, in the event it’s a framework like CRA?

I’m not sure I understand what you mean by this.

E.g, I’m working on an adaptor for contentful. My site currently using contentful and contentful-management on their own.

But the adaptor for Tina could also use them, but with some quality of life methods wrapped around them.

I’m wondering if the adaptor should export that, so my site can choose to use it instead of the contentful packages directly.

I’d likely make the packages peerDeps with a minimum version, so that people could manage the version.