probable-pink
probable-pink3mo ago

[JavaScript Mastery tutorial] Can't fetch any generated data

Hey, I'm following JSM tutorial video on YouTube https://www.youtube.com/watch?v=6a3Dz8gwjdg&t=5587s&ab_channel=JavaScriptMastery, and I'm trying to get data but nothing is showing up (see img) link to my repo: https://github.com/osherasfa/bumpy-rockets-begin any clue why?
JavaScript Mastery
YouTube
Build and Deploy a React Admin Dashboard With Real time Data, Chart...
Build an admin dashboard with full authentication, a homepage displaying charts and activities, a comprehensive table for companies with CRUD and search, and a Kanban board with real-time synchronization using Refine Framework. ⭐ Refine: https://github.com/refinedev/refine ‎💻 App Source Code and Readme (code snippets at the bottom): https://git...
GitHub
GitHub - osherasfa/bumpy-rockets-begin
Contribute to osherasfa/bumpy-rockets-begin development by creating an account on GitHub.
No description
12 Replies
kapa.ai
kapa.ai3mo ago
Hi @BowieTeth. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Hmm, I don't know enough to give you a confident answer yet. The issue could be due to a variety of reasons such as incorrect data fetching method, issues with your data provider, or even version differences between your refine setup and the one used in the tutorial. You can refer to the Data Fetching (https://refine.dev/docs/guides-concepts/data-fetching#multiple-data-providers) and Data Provider Interface (https://refine.dev/docs/guides-concepts/data-fetching/data-provider-interface) sections in the refine documentation for more information on how data fetching is handled in refine. Also, please ensure that you're using the correct version of refine as per the tutorial. If the tutorial uses an older version of refine, you might face issues due to changes in the newer versions. You can refer to this Github comment (https://github.com/refinedev/refine/issues/4242) for more information on how to create an app with a specific version of refine. If you're still facing issues, I would recommend reaching out to the refine community on Discord (https://discord.com/channels/837692625737613362/1223126612434751498) for more specific assistance. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai3mo ago
<@484679371911856129> kapa.ai is still learning and improving, please let us know how it did by reacting below
probable-pink
probable-pink3mo ago
@kapa.ai I am using graphql-codegen to get generated data but I'm only get 1 instance of data
kapa.ai
kapa.ai3mo ago
Let me check the knowledge base for you. One moment! :books: ---------------------- Based on the information provided, it's hard to pinpoint the exact issue. However, GraphQL Codegen generates typescript definitions based on your queries. If you're only getting one instance of data, it might be due to the way your query is structured. For example, if you're querying for a single user like this:
{
user(id: 1) {
name
email
}
}
{
user(id: 1) {
name
email
}
}
You will only get one instance of data. If you want to get multiple instances of data, you need to structure your query to fetch multiple items. For example:
{
users {
name
email
}
}
{
users {
name
email
}
}
This will return all users. You can also add filters, sorting, and pagination to your queries to customize the data you get. You can refer to the GraphQL Code Generator Documentation (https://the-guild.dev/graphql/codegen/docs/getting-started) for more information on how to use it. If you're using refine, you can refer to the refine documentation (https://refine.dev/docs/data/packages/nestjs-query#developer-experience) on how to use GraphQL Code Generator with refine. If you're still facing issues, I would recommend reaching out to the refine community on Discord (https://discord.com/channels/837692625737613362/1223126612434751498) for more specific assistance. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai3mo ago
<@484679371911856129> kapa.ai is still learning and improving, please let us know how it did by reacting below
kapa.ai
kapa.ai3mo ago
Let me check the knowledge base for you. One moment! :books: Sorry @BowieTeth, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
probable-pink
probable-pink3mo ago
@kapa.ai How can I watch all the existing data through the web
kapa.ai
kapa.ai3mo ago
Let me check the knowledge base for you. One moment! :books: ---------------------- In refine, you can easily create a page to display all the data from a specific route. For example, if you want to display all the data from the /posts route, you can run the command npm run refine create-resource posts. This will create a new page for the /posts route from the data provider. Since no specific operations are provided, all of the CRUD operations will be available. This command creates a new folder inside pages called posts and populates it with files index.ts, list.tsx, create.tsx, edit.tsx and show.tsx. After running the command, you can open up your browser and navigate to localhost:3000/posts. You should be able to see all of the data coming from the /posts route. There will also be action buttons to create, read, update, and delete the records. Please note that refine connects to any REST or GraphQL custom backend. You can check the list of available providers here (https://refine.dev/blog/refine-vs-adminbro#refine-available-providers). For more information, you can refer to this source (https://refine.dev/blog/react-admin-frameworks-refine-vs-blitz-js#refine-6). ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai3mo ago
<@484679371911856129> kapa.ai is still learning and improving, please let us know how it did by reacting below
probable-pink
probable-pink3mo ago
@kapa.ai Here my queries.ts file
kapa.ai
kapa.ai3mo ago
Let me check the knowledge base for you. One moment! :books: ---------------------- I'm sorry, but it seems like your message is incomplete. If you're having trouble with your queries.ts file, could you please provide more details or share the code you're having issues with? This will help me provide a more accurate solution. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai3mo ago
<@484679371911856129> kapa.ai is still learning and improving, please let us know how it did by reacting below