Merge branch 'v4' of github.com:vuejs/vue-apollo into v4
This commit is contained in:
@@ -250,6 +250,10 @@ export function useQueryImpl<
|
||||
}
|
||||
|
||||
function onNextResult (queryResult: ApolloQueryResult<TResult>) {
|
||||
// Remove any previous error that may still be present from the last fetch (so result handlers
|
||||
// don't receive old errors that may not even be applicable anymore).
|
||||
error.value = null
|
||||
|
||||
processNextResult(queryResult)
|
||||
|
||||
// Result errors
|
||||
|
||||
@@ -6,4 +6,4 @@ export type IsUnion<T, U = T> = U extends any ? ([T] extends [U] ? false : true)
|
||||
/**
|
||||
* Extracts an inner type if T has a single key K, otherwise it returns T.
|
||||
*/
|
||||
export type ExtractSingleKey<T, K extends keyof T = keyof T> = IsUnion<K> extends true ? T : T[K]
|
||||
export type ExtractSingleKey<T, K extends keyof T = keyof T, KWithoutTypename extends K = Exclude<K, '__typename'>> = IsUnion<KWithoutTypename> extends true ? T : T[KWithoutTypename]
|
||||
|
||||
@@ -71,12 +71,14 @@ export interface ExampleUpdatedSubscriptionVariables {
|
||||
}
|
||||
|
||||
export interface SingleKeyExampleQuery {
|
||||
__typename?: 'Root'
|
||||
example?: {
|
||||
__typename?: 'Example'
|
||||
}
|
||||
}
|
||||
|
||||
export interface MultiKeyExampleQuery {
|
||||
__typename?: 'Root'
|
||||
example?: {
|
||||
__typename?: 'Example'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user