Rename directive on enum type causes field to be deleted


#1

I’m looking to rename one of my enum fields with the @rename directive, but it appears to not work.

enum State {
  DRAFT
}

to

enum State {
  UNRECORDED_DRAFT @rename(oldName: DRAFT)
}

What I expect to happen is the DRAFT enum gets renamed to UNRECORDED_DRAFT

But I receive the following error:

Errors:

  Global
    ✖ You are deleting the value 'DRAFT' of the enum 'State', but that value is in use.

I was not expecting an error to appear, but a warning that the field is in use so I could force the change.

Is renaming an ENUM supported or perhaps I’m understanding the @rename directive incorrectly.

Cheers,
Andrew


#2

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.