How do I remove this general condition property and just use sphere and shape id to fetch it from the Graphql query?
Assistant:
To remove the generic condition property and instead use sphere_id and shape_id directly in your GraphQL query, you'll need to modify both the DashboardNewTablePosts component and the GraphQL query itself.
Step 1: Update the GraphQL Query
First, you need to update your GraphQL query to accept sphere_id and shape_id as variables.
Assuming your GraphQL query is defined in the useGetChannelPostsWithDateQuery hook, you will need to update it to include sphere_id and shape_id as filter parameters. It might look something like this (note that this is a hypothetical change as I don't have access to the actual query definition):
Step 4: Ensure GraphQL Schema Supports These Variables
Make sure that your GraphQL backend supports querying with sphere_id and shape_id. If not, you might need to update your backend to add this functionality.
By following these steps, you can transition away from using a generic condition and leverage specific fields like sphere_id and shape_id directly, which can make your data fetching more precise and the component props more focused.