React Apollo - Make Multiple Queries

后端 未结 10 1940
渐次进展
渐次进展 2021-01-30 16:36

I have a queries file that looks like this:

import {gql} from \'react-apollo\';

const queries = {
  getApps: gql`
    {
      apps {
        id
        name
            


        
10条回答
  •  梦毁少年i
    2021-01-30 17:39

    Since, compose has been removed from apollo, there's an alternative library called lodash. The method {flowRight} acts in the same way as compose. Just follow the steps:-

    1. npm i -s lodash

    2. import {flowRight} from 'lodash'

    3. Exchange the usage of compose with flowRight, all the other code will work the same.

提交回复
热议问题