📜  查询序列 graphql - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:33.383000             🧑  作者: Mango

代码示例2
export default compose(
  graphql(firstQuery, {
    name: 'firstQuery'
  }),
  graphql(secondQuery, { 
    name: 'secondQuery',
    skip: ({ firstQuery }) => !firstQuery.data,
    options: ({firstQuery}) => ({
      variables: {
          var1: firstQuery.data.someQuery.someValue
      }
    })
  })
)(withRouter(TestPage))