hasura/graphql-engine · error · PluginValidationError
Plugin {plugin_name} is defined more than once
Error message
Plugin {plugin_name} is defined more than once What it means
Thrown when two lifecycle plugins in the metadata share the same qualified name. Plugin names form a namespace (per subgraph) and must be unique.
Source
Thrown at v3/crates/metadata-resolve/src/stages/plugins/error.rs:21
use open_dds::plugins::LifecyclePluginName;
#[derive(Debug, thiserror::Error)]
pub enum PluginValidationError {
#[error("Plugin {plugin_name} references unknown data connector {data_connector_name}")]
UnknownDataConnector {
plugin_name: Qualified<LifecyclePluginName>,
data_connector_name: Qualified<DataConnectorName>,
},
#[error(
"Data connector {data_connector_name} is referenced by multiple {plugin_type} plugins: {plugin_name_a} and {plugin_name_b}"
)]
DuplicatePluginForDataConnector {
plugin_type: String,
data_connector_name: Qualified<DataConnectorName>,
plugin_name_a: Qualified<LifecyclePluginName>,
plugin_name_b: Qualified<LifecyclePluginName>,
},
#[error("Plugin {plugin_name} is defined more than once")]
DuplicatePluginName {
plugin_name: Qualified<LifecyclePluginName>,
},
}
View on GitHub (pinned to 724551b9ae)
Solutions
- Search all plugin definitions for the name in the error and remove or rename the duplicate
- Check that no plugin metadata file is included twice in your build/export process
- Adopt a naming convention (e.g. <connector>_<purpose>_plugin) to avoid collisions
Example fix
# before
plugins:
- name: auditPlugin
...
- name: auditPlugin # duplicate
# after
plugins:
- name: auditPlugin
...
- name: auditPluginV2
... Defensive patterns
Strategy: validation
Validate before calling
const seen = new Set();
for (const p of plugins) {
const key = `${p.subgraph}::${p.name}`;
if (seen.has(key)) throw new Error(`duplicate plugin ${key}`);
seen.add(key);
} Prevention
- Use a plugin naming convention including purpose and connector
- Ensure metadata files are not included twice in the build
When it happens
Trigger: Declaring two lifecycle plugins with the same LifecyclePluginName (same subgraph + name), typically via duplicated definitions or overlapping metadata files; detected during the plugins validation stage.
Common situations: Copy-pasting a plugin block without renaming; including the same plugin file twice in the metadata build; merging subgraphs that both define a plugin with the same name.
Related errors
- Data connector {data_connector_name} is referenced by multip
- Cannot add query root field {0} as it already in use
- Cannot add mutation root field {0} as it already in use
- Cannot add subscription root field {0} as it already in use
- the boolean expression type with name {type_name} is defined
AI-assisted analysis of hasura/graphql-engine@724551b9ae (2026-08-28).
Data as JSON: /api/errors/ca85685e4193df34.
Report an issue: GitHub.