fix: apollo-client 3.4 FetchMoreQueryOptions, closes #1252

This commit is contained in:
Guillaume Chau
2021-09-20 18:11:09 +02:00
parent a35b04ff05
commit e0786acda0
3 changed files with 900 additions and 828 deletions
+2 -2
View File
@@ -41,12 +41,12 @@
"vue-demi": "^0.9.1"
},
"peerDependencies": {
"@apollo/client": "^3.2.1",
"@apollo/client": "^3.4.13",
"graphql": "^15.3.0",
"vue": "^2.6.0 || ^3.1.0"
},
"devDependencies": {
"@apollo/client": "^3.0.0",
"@apollo/client": "^3.4.0",
"@types/throttle-debounce": "^2.1.0",
"nodemon": "^1.18.4",
"vue": "^3.1.0"
@@ -70,7 +70,7 @@ export interface UseQueryReturn<TResult, TVariables> {
options: UseQueryOptions<TResult, TVariables> | Ref<UseQueryOptions<TResult, TVariables>>
query: Ref<ObservableQuery<TResult, TVariables> | null | undefined>
refetch: (variables?: TVariables) => Promise<ApolloQueryResult<TResult>> | undefined
fetchMore: <K extends keyof TVariables>(options: FetchMoreQueryOptions<TVariables, K> & FetchMoreOptions<TResult, TVariables>) => Promise<ApolloQueryResult<TResult>> | undefined
fetchMore: (options: FetchMoreQueryOptions<TVariables, TResult> & FetchMoreOptions<TResult, TVariables>) => Promise<ApolloQueryResult<TResult>> | undefined
subscribeToMore: <TSubscriptionVariables = OperationVariables, TSubscriptionData = TResult>(options: SubscribeToMoreOptions<TResult, TSubscriptionVariables, TSubscriptionData> | Ref<SubscribeToMoreOptions<TResult, TSubscriptionVariables, TSubscriptionData>> | ReactiveFunction<SubscribeToMoreOptions<TResult, TSubscriptionVariables, TSubscriptionData>>) => void
onResult: (fn: (param: ApolloQueryResult<TResult>) => void) => {
off: () => void
@@ -428,7 +428,7 @@ export function useQueryImpl<
// Fetch more
function fetchMore<K extends keyof TVariables> (options: FetchMoreQueryOptions<TVariables, K> & FetchMoreOptions<TResult, TVariables>) {
function fetchMore (options: FetchMoreQueryOptions<TVariables, TResult> & FetchMoreOptions<TResult, TVariables>) {
if (query.value) {
return query.value.fetchMore(options)
}
+896 -824
View File
File diff suppressed because it is too large Load Diff