graphile / graphile/worker

Feature: Add an API for giving workers more helpers

Open
#113 4 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
2.4k
Forks
126
Avg merge
2d 2h
Merged PRs (30d)
9

Description

**Usecase**

Give users of graphile-worker the ability to pass in custom helpers. This could include custom database connection objects, metadata, application-specific helpers, etc...

For example:

My specific usecase is to pass a Slonik database connection object.

**Implementation**

https://github.com/graphile/worker/blob/1d4fa8c08f10f49eaca2343365a5db2b477206bf/src/helpers.ts#L71

It looks like if [this](https://github.com/graphile/worker/blob/1d4fa8c08f10f49eaca2343365a5db2b477206bf/src/helpers.ts#L71
) TODO was done, this usecase could be satisified.

I'm not sure what the ultimate implementation would look like. Would there be a specific file like `helpers.ts` that would be loaded and named exports would automatically be included?

**Pitfalls/Things to watch out for**

- Naming conflicts with existing helpers -- Is it okay to override?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.