Open orblazer opened 5 years ago
I have the same problem.
I'm sorry I don't understand what the issue is, could you please be more explicit?
Hello, For explain, when we use smart query the type of error is defined from here : https://github.com/apollographql/apollo-client/blob/1098e428a013f94281d422fbaebc4bc741a007d1/packages/apollo-client/src/core/types.ts#L24
But is result object the error is : error
I still don't understand, could you please provide some examples? Thanks!
Im little stupid because i have already make that issue in the problem 2
on https://github.com/Akryum/vue-apollo/issues/605
Is it fixed with the new types in latest versions?
@Akryum it's about the object passed into the result()
callback: its type is ApolloQueryResult<T>
but the problem is that the object received in this callback does not satisfy this interface. The errors
field is missing and instead the field error
(singular) is passed. I don't recall if the type is correct of this field (GraphQLError
). I'll check with the latest RC and let you know.
@Akryum I can confirm this problem still exists with rc7, there is only an error
field, instead of the errors?: ReadonlyArray<GraphQLError>
field from ApolloQueryResult
. The error
field seems to be of type GraphQLError
(the one on the error
handler function).
Isn't this the place where the errors variable should be set https://github.com/Akryum/vue-apollo/blob/be6f8c580b0fedc0cff4f509fa4a099968492b95/src/components/ApolloQuery.js#L178-L184
vue-apollo pass the result
object from Apollo Client directly, so this is an issue with it rather than vue-apollo.
Hello, When use query and method result on vue component the object data contains
error
but the type excepterrors
.Thanks.