Skip to content
This repository was archived by the owner on Sep 14, 2026. It is now read-only.
This repository was archived by the owner on Sep 14, 2026. It is now read-only.

Generation tool should annotate deprecated fields with @Deprecated. #6

Closed

Description

@sav007

GraphQL schema provides isDeprecated flag to deprecate fields.
Generation tool should annotate accessor methods to these fields with @deprecated annotation.
Would be nice even provide the reason that specified in deprecationReason

Activity

  1. dylanahsmith commented on Feb 7, 2017

    @dylanahsmith
    Contributor

    Yes, it would be nice to optional provide support for this. This is basically the approach we took for swift using attributes.

    The problem I ran into with trying to surface this information for java was that our mobile-shopify project was already using a bunch of deprecated android fields to support older android versions, so just marking methods as deprecated wouldn't make their use obvious enough to make sure all usage of deprecated fields are removed.

    So if you are going to add support for deprecation attributions, then make sure you can enable a lint check that allows deprecated fields usage to be noticed and removed quickly after they are deprecated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions