Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example: Add frontend migration example #335

Draft
wants to merge 2 commits into
base: schemaExample
Choose a base branch
from

Conversation

andresmgot
Copy link
Contributor

@andresmgot andresmgot commented Jul 9, 2024

Example of how a change in the API + migration code may look in a plugin.

Note that this assumes that the plugin uses a schema and a API version. See this base PR.

In this case, I am deprecating the field multiplier of the QueryData and renamed it multiply. Now both properties are optional, to avoid breaking changes in the apiVersion.

Note that the query is automatically migrated when running a query but it's necessary for the plugin to manually call migrateQuery in the QueryEditor to ensure that it's using the latest version of the Query schema.

This is a demonstration for grafana/grafana#90231

@andresmgot andresmgot changed the title Example: Add migration example Example: Add frontend migration example Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🧑‍💻 In development
Development

Successfully merging this pull request may close these issues.

1 participant