Im migrating a Functional test app made on 0.1.X to 0.2.X.
Now my queries must be independent or maybe i dont know how to concatenate them like. In 0.1.X i could have more than one querie in one connect. In 0.2.X gql prompts:
Uncaught Error: Queries must have exactly one operation definition.
Thats cool… i know its right because each component should have its own query and not one component all the queries and give the props to the children. Isnt it ?
Now i only want to refetch something and not both, this.props.data.refetch() will bring the whole query. In the past i could call this.props.something.refetch(). Is there anyway to achieve this ?
Ah, sounds like you are referring to transitioning from the old connect API from react-apollo to the new graphql one. The old container allowed multiple queries in one container, but now you need to make one container per query you want to refetch. This makes the API a bit simpler since you don’t need to deal with as many nested objects.
Mmm is not what i want, is my problem in fact, i was not thinking in REACT way. I was seeking to implement two queries in one component, but i will stick to the react cycle and create two different components for each problem.