I cloned this React dashboard and adapted it to my needs then i wanted to fetch data from graphql and display it in a table ( orders and products tables , I'll continue talking about orders ) then when the user click on a specific button it opens a page that have all the specific details about the order he chooses! an id will be taken from the first query ( orders that display many orders ) and will be passed as a variable to the 2nd query with is order to display that order details . i wanna Know how to display the data from the first query then the specific data for a single order
this is how the UI should look ( it is changed but I just wanted to clarify the idea more ) :
orders list :

orders details :

graphql :
an input type has been created that is likely to be reused.(PaginationInput)

query :
query Orders($input1: PaginationInput) {
Orders(input: $input1){
pageInfo {
hasNextPage
hasPreviousPage
}
edges{
cursor
node {
id
closed
email
createdAt
updatedAt
cancelledAt
displayFinancialStatus
displayFulfillmentStatus
lineItems{
edges{
node {
customAttributes{
key
value
}
id
quantity
title
variant{
id
image {
altText
id
src
}
title
weight
weightUnit
price
}
}
}
}
phone
subtotalPrice
totalPrice
totalRefunded
totalTax
processedAt
}
}
}
}
query Order($id: ID!){
Order (id: $id){
id
displayFinancialStatus
displayFulfillmentStatus
email
id
createdAt
subtotalPrice
totalRefunded
totalShippingPrice
totalPrice
totalTax
updatedAt
lineItems{
edges {
node {
customAttributes{
key
value
}
quantity
title
id
variant{
id
title
weight
weightUnit
price
image {
src
}
}
}
}
}
shippingAddress {
address1
address2
city
company
country
countryCode
firstName
id
lastName
name
phone
province
provinceCode
zip
}
}
}
query variables example :
{
"input1": {
"num": 30
},
"id": "gid://shopify/Order/order_id_here"
}
i'm still new to graphql so i don't know ho to do this !