introspection

Experimental Feature

This configuration entry is related to an Experimental (Optional) feature called Enhanced Introspection. Before you start to configure this section, make sure to read the page specific for this feature (accessible here) and this page that explains how to enable Experimental Features.

Versioning History

API Version v2.0.0 - Introduced introspection configuration option.

Introspection allows you to define rules that your model names have to follow. To configure model rules, add the following lines to your configuration object:

prisma-util.config.mjs
export default {
    // Other configuration lines
    introspection: {
        modelPatterns: {
            $static: {
                "Model1": "Mapping1",
                "Model2": async (model) => model
            },
            $regex: {
                "Model(\\d)": async (model, match, number) => model
            }
        }
    }
};

Last updated