Flag lifecycle

When a flag is no longer needed, you can mark it as deprecated in your schema from the Hypertune UI or in GraphQL with the @deprecated directive:

type Root {
  showNewEditor: Boolean! @deprecated(reason: "New editor has shipped.")
}

A deprecated flag will still evaluate correctly, but when you regenerate your client, it won't be included so you'll get type errors everywhere it's used. Once all its references have been removed, you can safely delete it from the UI.

This enables a type-safe, compiler-driven workflow to clean up a flag:

  1. Deprecate a flag from the UI

  2. Regenerate your client and fix the type errors to safely remove all the flag's references

  3. Deploy your code changes

  4. Delete the flag from the UI

Last updated