React Apollo - Make Multiple Queries

后端 未结 10 1958
渐次进展
渐次进展 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条回答
  •  滥情空心
    2021-01-30 17:30

    For Apollo 2.x: you can use react-adopt to compose the Queries and Mutations into a single level. (That lib will compose any components with render props, e.g. the React Context API.)

    https://github.com/pedronauck/react-adopt

提交回复
热议问题