Warning from graphql-codegen or typescript when using deprecated graphql fields

  Kiến thức lập trình

Is it possible to get some TS compilation warning or from graphql-codegen when using deprecated field as below?

TestTypeFragment.ts

import { gql } from '@apollo/client';

export default gql`
  fragment TestType on TestType {
    deprecated
    nonDeprecated
  }
`;

graphql-types.generated.ts

export type TestType = {
  __typename?: 'TestType';
  /** @deprecated use nonDeprecated instead */
  deprecated: Maybe<Scalars['String']['output']>;
  nonDeprecated: Scalars['String']['output'];
};

LEAVE A COMMENT