-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support apollo-client ~3.5.0 #127
Comments
Hi @smykhailov |
sorry, I don't know what is Component notation? This one is still needed. everything works as expected with this patch on 3.5.5 diff --git a/node_modules/@apollo/client/react/components/Mutation.d.ts b/node_modules/@apollo/client/react/components/Mutation.d.ts
index 9288a7c..bf1dd98 100644
--- a/node_modules/@apollo/client/react/components/Mutation.d.ts
+++ b/node_modules/@apollo/client/react/components/Mutation.d.ts
@@ -1,12 +1,5 @@
/// <reference types="react" />
-import * as PropTypes from 'prop-types';
import { OperationVariables } from '../../core';
import { MutationComponentOptions } from './types';
export declare function Mutation<TData = any, TVariables = OperationVariables>(props: MutationComponentOptions<TData, TVariables>): JSX.Element | null;
-export declare namespace Mutation {
- var propTypes: PropTypes.InferProps<MutationComponentOptions<any, any, import("../../core").DefaultContext, import("../../core").ApolloCache<any>>>;
-}
-export interface Mutation<TData, TVariables> {
- propTypes: PropTypes.InferProps<MutationComponentOptions<TData, TVariables>>;
-}
//# sourceMappingURL=Mutation.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@apollo/client/react/components/Query.d.ts b/node_modules/@apollo/client/react/components/Query.d.ts
index 7577c29..64f5602 100644
--- a/node_modules/@apollo/client/react/components/Query.d.ts
+++ b/node_modules/@apollo/client/react/components/Query.d.ts
@@ -1,12 +1,5 @@
/// <reference types="react" />
-import * as PropTypes from 'prop-types';
import { OperationVariables } from '../../core';
import { QueryComponentOptions } from './types';
export declare function Query<TData = any, TVariables = OperationVariables>(props: QueryComponentOptions<TData, TVariables>): JSX.Element | null;
-export declare namespace Query {
- var propTypes: PropTypes.InferProps<QueryComponentOptions<any, any>>;
-}
-export interface Query<TData, TVariables> {
- propTypes: PropTypes.InferProps<QueryComponentOptions<TData, TVariables>>;
-}
//# sourceMappingURL=Query.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@apollo/client/react/components/Subscription.d.ts b/node_modules/@apollo/client/react/components/Subscription.d.ts
index c07aefd..4ec526b 100644
--- a/node_modules/@apollo/client/react/components/Subscription.d.ts
+++ b/node_modules/@apollo/client/react/components/Subscription.d.ts
@@ -1,12 +1,5 @@
/// <reference types="react" />
-import * as PropTypes from 'prop-types';
import { OperationVariables } from '../../core';
import { SubscriptionComponentOptions } from './types';
export declare function Subscription<TData = any, TVariables = OperationVariables>(props: SubscriptionComponentOptions<TData, TVariables>): JSX.Element | null;
-export declare namespace Subscription {
- var propTypes: PropTypes.InferProps<SubscriptionComponentOptions<any, any>>;
-}
-export interface Subscription<TData, TVariables> {
- propTypes: PropTypes.InferProps<SubscriptionComponentOptions<TData, TVariables>>;
-}
//# sourceMappingURL=Subscription.d.ts.map
\ No newline at end of file |
Yeah that thing is the Component notation. Legacy PropTypes breaks generic inference :( |
should I create a patch for 3.5 and merge here? |
That would be great, thank you! I really want Apollo-Client to drop the PropTypes thing, it breaks some TS features because it's no longer the recommended way to |
@dotansimha I try to upgrade apollo client on our codebase and realized there is no patch for Apollo client ~3.5.0.
Are there any plans to add this version, or can I workaround it by creating my own patch?
The text was updated successfully, but these errors were encountered: