Unable to obtain categories from refine strapi demo endpoint using refine, Strapi and chakraUI

Hello, I’m building a simple CRUD application using refine with a strapi-v4-provider and Chakra-UI as design library. I’m using the refine’s strapi v4 endpoint for testing purposes. I was able to access the endpoint for posts and render it on the table (for chakra UI) but unable to access the categories endpoint in a bid to relate the data from categories to the posts.
H
hilarious-sapphire429d ago
Hey, I am refine support bot :wave:. I am here to help you with your question. I searched for the answer to your question in the refine documentation and could not find an answer. Please wait for someone from the refine core team or the community to try to help you. 👊
X
xenial-black429d ago
Hi @gitarackur, we will debug strapi-v4 example this example works as expected. https://refine.dev/docs/examples/data-provider/strapi-v4/ do you get any error ? if you reproduce the issue on any platform, i will happy to debug
A
ambitious-aqua429d ago
Ok @alicanerdurmaz , I saw this example on the DOCS, but this is An Ant-design implementation I took a look at this one https://refine.dev/docs/tutorial/adding-crud-pages/chakra-ui/index/#handling-relationships This works but it’s a different endpoint (a product endpoint with categories) I tried replicating it and adjusted it to suit the case for the post endpoints but the categories wasn’t returning.
1. Adding List Page | refine
In Unit 2.4, we created the CRUD pages automatically with Inferencer. In this unit, we will create the CRUD pages manually using the codes generated by Inferencer. So, you can customize the pages as you wish.
X
xenial-black429d ago
actually UI packages have nothing to do with dataProvider 🤔 in strapi-v4, you can populate relations like this https://refine.dev/docs/advanced-tutorials/data-provider/strapi-v4/#relations-population this example for @pankod/refine-simple-rest dataProvider
A
ambitious-aqua429d ago
Ya. @alicanerdurmaz , the useTable() hook where the population will take place is that of ant-design
X
xenial-black429d ago
all data hooks accepts metaData.
import { useTable } from "@pankod/refine-react-table";

useTable({
refineCoreProps: {
metaData: {
populate: ["category"],
},
},
});
import { useTable } from "@pankod/refine-react-table";

useTable({
refineCoreProps: {
metaData: {
populate: ["category"],
},
},
});
A
ambitious-aqua429d ago
Thanks 🔥🔥 @alicanerdurmaz , this is exactly what I needed. This is because, the previous example didn’t show the refineCoreProps property so I tried adding the metadata property without enclosing it in the refineCoreProps property so typescript was throwing an error on that.
X
xenial-black429d ago
i'm sorry for confusion :/
A
ambitious-aqua429d ago
No worries.. it was no confusion 👍 Thanks a lot 🔥 @alicanerdurmaz
X
xenial-black429d ago
your welcome, i'm glad to help 🚀
More Posts
malfunction in installationHow do I go about this error because when I execute npm run dev, the terminal returns an error with reference to defining relations between collections in appwritethere is a reference in this page https://refine.dev/docs/advanced-tutorials/data-provider/appwrite/Disable Autocomplete in InferencersHi, I have two issues with the Autocomplete component in relation fields. A. With big resources, tReset sorting for useTableI have a reset button, which I am using to reset the sorting on the table. Btw I am also doing multiMultiple providers - don't neccesiate default provider?Hi guys, Opening it here for a discussion rather than a github issue. I use multiple providers, butAntd useDrawerForm not clearingWhat is the best way to clear the useDrawerForm when drawer is closed or when form is submitted? RigDefault access-control-casbin with next.js give warning of critical dependencyAfter integrating casbin with refine next.js project, I follow through boiler template but with nextCan I use the antD useTable with a resource or endpoint that is essentially custom?Hi guys, wondering if i'm going about this the wrong way and could use some advice / help if possiblgoogle authentication popup issue.okay first off what i want: the integrated google authentication to work. what i have done: 1. creaRefine _ Compiled with problems:Hi, While compiling a refine code, I have the next error: TS2786: 'ReactApexChart' cannot be used Inferencer date inferring is too sensitiveHi 🙂 Another issue I've encountered. I have a number field, that the Inferencer recognizes as a DatuseParams, useResource giving different results in different context.I tried to get the resourceName, actions, params by using one of this hook inside `react-router-v6` Inferencer disregards null-value fieldsHi there 👋 So I'm making actual progress using the library with the modifications I've used to the Hi pinksheep 3388 can you give us `npmHi @sheepndreams, can you give us `npm run refine whoami` output for debug ?Inferencer - how to use a diferent identifer idHi, I want to use the Inferencer (MUI) to generate the views for my data. However, my data use theUse fieldTransformerHey😩 guys can some someone send me an example of how I can use fieldTransformer const handleTransfAuth Azure B2C with Next.jsI am trying to implement authentication with azure B2C with next, however in the doc there are some Preview Image on edit page loadHi ! how do in ensure that when I go to my edit page, it shows image on my Upload component ? When Change root background .Hello all first time on using refine and I love it . I’ m actually looking at changing the backgroShare variabel with different components.I have a component with a usestate hook - const [co2TotalSaving, setCo2TotalSaving] = useState(0),