Fork me on GitHub
#graphql
<
2022-02-28
>
enn16:02:25

Anyone have patterns or best practices for doing generic transforms based on type (from the schema)? E.g., converting external IDs to internal ones I know about inject-scalar-transformers, but in my case I need to be able to access context (specifically, a database connection) that is only available at runtime.

thumbnail20:02:07

In our case; we use a multimethod as the ID-scalar-transformer, which generally operates on a map (filled with data from the database 🙂)