Skip to content

Allow plugins to add tasks #562

Description

@GerkinDev

Feature description

Give the ability to plugins to mutate tasks list.

Motivating example

I'm using the 0.17.0-rc.0. From discussion in #548, I'm trying to move my logic to the plugin system. However, for ease of use, the plugin would need to setup itself in the graphile worker during bootstrap by adding its own internal tasks.

This would allow to remove any core logic specific for LoadTaskFromJsPlugin & LoadTaskFromExecutableFilePlugin.

This issue is not blocking, since my plugin factory could return the plugin and a task list, like so:

const pluginConfig = MyPlugin(someConfiguration)
await run({
    preset: { plugins: [pluginConfig.plugin] },
    taskList: {...pluginConfig.taskList}
}),

However it's easy to miss, and I think that allowing plugins to add their own tasks make sense

Supporting development

I [tick all that apply]:

  • am interested in building this feature myself
  • am interested in collaborating on building this feature
  • am willing to help testing this feature before it's released
  • am willing to write a test-driven test suite for this feature (before it exists)
  • am a Graphile sponsor ❤️
  • have an active support or consultancy contract with Graphile

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions