Use result for first query in second query with Apollo Client?
问题 Im using Apollo, React and Graphcool. I have a query to get the logged in users ID: const LoginServerQuery = gql` query LoginServerQuery { loggedInUser { id } } `; I need to use the returned ID in another query which is called from the same React component. Here Ive hardcoded "xxxxxxxxxxxxx" which is where the dynamic user ID needs to go: const LocationQuery = gql` query LocationsQuery { User(id: "xxxxxxxxxxxxx") { location { name } } } `; 回答1: If you import compose like so: import { graphql,