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

Breaking: Fix plugin addition order #1717

Merged
merged 1 commit into from Nov 18, 2021
Merged

Breaking: Fix plugin addition order #1717

merged 1 commit into from Nov 18, 2021

Conversation

ghost
Copy link

@ghost ghost commented Nov 17, 2021

As posted in Discord, the api.AddPlugin function appends plugins to the existing array of plugins, this causes the default plugins to run after the custom plugins, overwriting the result. (the modelgen hook example in the documentation does not work)

This fix makes it prepend the new plugin. May or may not be a breaking change for some.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.06%) to 67.636% when pulling 1dc9276 on erwin-k:add-plugin-fix into af33b7c on 99designs:master.

@StevenACoffman
Copy link
Collaborator

Thanks! I can't imagine that anyone was relying on the old behavior, but we should advertise this change for existing custom plugin authors.

@StevenACoffman StevenACoffman merged commit f591c8f into 99designs:master Nov 18, 2021
@ghost ghost deleted the add-plugin-fix branch November 18, 2021 11:42
Code-Hex added a commit to Code-Hex/gqlgen that referenced this pull request Jan 24, 2022
@StevenACoffman StevenACoffman mentioned this pull request Jan 24, 2022
2 tasks
StevenACoffman pushed a commit that referenced this pull request Jan 24, 2022
@StevenACoffman StevenACoffman changed the title Fix plugin addition Breaking: Fix plugin addition Jan 24, 2022
@StevenACoffman StevenACoffman changed the title Breaking: Fix plugin addition Breaking: Fix plugin addition order Jan 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants