ballerina-platform / ballerina-spec

Ballerina Language and Platform Specifications
Other
167 stars 54 forks source link

Allow @deprecated annotation on fields in a record type #823

Open ayeshLK opened 3 years ago

ayeshLK commented 3 years ago

Description:

Describe your problem(s)

Sample

MaryamZi commented 3 years ago

Moving this issue to the spec repo since the spec currently allows the @deprecated annotation only on object fields.

ThisaruGuruge commented 2 years ago

Is there any plan to support this? This is needed for GraphQL to fully support the @deprecate directive, which is a default directive defined by the GraphQL spec.

chamil321 commented 2 years ago

Any update on the issue? HTTP has the same requirement to deprecate config(record) fields as new(improved) fields are being added.

hasithaa commented 2 years ago

Supporting this is straightforward. But I wonder, once you deprecated a field, what is the strategy to introduce a new field or a record? Because there is a possibility of the new field/record may break backward compatibility.