You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Actual outcome: Property 'query' is missing in type '{ fetchPolicy: "no-cache"; }'.
Argument of type '{ link: ApolloLink; cache: InMemoryCache; defaultOptions: { query: { fetchPolicy: "no-cache"; }; ...' is not assignable to parameter of type 'ApolloClientOptions<NormalizedCacheObject>'. Types of property 'defaultOptions' are incompatible. Type '{ query: { fetchPolicy: "no-cache"; }; }' is not assignable to type 'DefaultOptions'. Types of property 'query' are incompatible. Type '{ fetchPolicy: "no-cache"; }' is not assignable to type 'QueryOptions<OperationVariables>'. Property 'query' is missing in type '{ fetchPolicy: "no-cache"; }'.
Versions
Apollo client 2.3.3 (was working in 2.3.1, haven't tested 2.3.2)
Notes
I am assuming this was an unintended change from #3569?
The text was updated successfully, but these errors were encountered:
When the new `QueryBaseOptions` and `QueryOptions` interfaces
were created in
eb89b23,
`ModifiableWatchQueryOptions` was replaced by `QueryOptions`
when checking the `query` `defaultOptions` used in the
Apollo Client constructor. Unfortunately, this introduced a
small type check bug since the `query` property in `QueryOptions`
is a mandatory property, whereas `ModifiableWatchQueryOptions`
did not include this property. This commit replaces the use of
`QueryOptions` with `QueryBaseOptions` when type checking
`query` in `defaultOptions`, since `QueryBaseOptions` doesn't
have a `query` property.
Fixes#3583.
Intended outcome:
Typescript doesn't complain when setting default query options without a query value
Actual outcome:
Property 'query' is missing in type '{ fetchPolicy: "no-cache"; }'.
Versions
Apollo client 2.3.3 (was working in 2.3.1, haven't tested 2.3.2)
Notes
I am assuming this was an unintended change from #3569?
The text was updated successfully, but these errors were encountered: