Skip to content

Directive deprecated is not applicable on INPUT_FIELD_DEFINITION #1579

Description

@vikusku

Hi,

The title is pretty much self explanatory. When trying to generate code from schema that had @deprecated directive on the input fields I get this error. Is it a bug or expected behaviour? If it's not a bug what is the reason behind dropping @deprecated directive support on INPUT_FIELD_DEFINITION?

Minimal graphql.schema and models to reproduce

schema {
    query: Query
}

type Query {
   getMenu(input: GetMenuInput!): Menu!
}

input GetMenuInput {
    menuID: ID @deprecated(reason: "Use `id`")
    id: ID
}

type Menu {
    id: ID!
    name: String!
}

versions

  • gqlgen version - v.0.12.*
  • go version - go1.16.6
  • go modules

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions