Multiple Queries/Mutation in Apollo 2.1

后端 未结 6 525
滥情空心
滥情空心 2021-02-05 12:10

I need some help using the new Query and Mutation component in Apollo 2.1, especially with multiple queries and mutations.

I have the following problems:

  1. I
6条回答
  •  一生所求
    2021-02-05 12:35

    Asides from using compose from react-apollo, another great utility library you can check it out is react-adopt. A great small utility lib that helps you to compose multiple render props type components so you don't have a nested hell patterns.

    I have wrote a similar answer that basically covers all your current needs in terms of:

    • How to consume a previous result from your mapper fn via react-adopt
    • Combine multiple Query/Mutations from Composed component via react-adopt

    Here's the detailed answer you're looking for & hopefully can be helpful to solving your problems :)

提交回复
热议问题