abstract-brown
abstract-brown6mo ago

Usage with messy backend

Hi guys, How would I use Refine with a bit more messy backend? Its written in Nestjs, but the endpoints are a bit messy. Does not follow the expected methods.
3 Replies
kapa.ai
kapa.ai6mo ago
Hi @HoXsan. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Refine is designed to work with any REST or GraphQL custom backend, including NestJS. It provides data providers for APIs implemented with Nest.js CRUD and Nest.js Query. These data providers allow you to connect your NestJS APIs to Refine and manage your data efficiently. However, if your backend does not follow the expected methods, you might need to create a custom data provider to handle the specific requirements of your backend. This would involve implementing the methods required by Refine to interact with your backend, such as getList, getOne, getMany, create, update, updateMany, delete, and deleteMany. Here is an example of how you can create a new application with a custom data provider using Refine:
npm create refine-app@latest -- --example data-provider-nestjs-query
npm create refine-app@latest -- --example data-provider-nestjs-query
You can find more information about creating custom data providers in the Refine documentation (https://refine.dev/docs/data/providers/overview). Also, you can check the Nest.js Query package (https://doug-martin.github.io/nestjs-query/) for more details on how to configure your backend. Sources: - Refine's Support for NestJS (https://refine.dev/blog/nest-js#bonus-refines-support-for-nestjs) - Refine Available Providers (https://refine.dev/blog/refine-vs-adminbro#refine-available-providers) - Refine's Backend Integrations (https://refine.dev/blog/web-development#refines-backend-integrations) - Discord Support Thread: NestJs Data Providers Backend Example (https://discord.com/channels/837692625737613362/1160375749660913706) - Refine Example with Nest.js Query (https://github.com/refinedev/refine/blob/master/examples/data-provider-nestjs-query/README.md) ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai6mo ago
<@319138840092606465> kapa.ai is still learning and improving, please let us know how it did by reacting below
abstract-brown
abstract-brown6mo ago
Will it be a good practice to update the hooks so it behaves different for each resources?