首页 > 解决方案 > 如何将数据从 graphql 传递到另一个页面?

问题描述

嗨,我想使用 graphql 将数据从另一个页面传递,这是我的代码示例

const getListQuery=gql`
{
    storelist{
        id
      storeName
      storeLogoUrl
      deliveryType
      storeDescription
    }
  }`

我想将 storelist 的 id 作为 store id 传递给以下查询。

const getListQuery = gql`
      {
       
    salesdepartments(storeid:"5ef5cd9114a4659138eb8e11")
    {
      name
      id
     
      departmentProducts{
       productname
       images
       id
       price
     }
    }
  }

标签: reactjsgraphqlclientapollo

解决方案


推荐阅读