Skip to content

Commit

Permalink
config reloads with existing componentField defs
Browse files Browse the repository at this point in the history
  • Loading branch information
AlecAivazis committed Mar 6, 2024
1 parent 2be78cf commit 1000510
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/houdini/src/codegen/validators/componentFields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,14 @@ export default async function componentFields(config: Config, docs: Document[]):
if (
parentType &&
fieldValue &&
((graphql.isObjectType(parentType) && parentType.getFields()[fieldValue]) ||
config.componentFields[parent]?.[fieldValue])
graphql.isObjectType(parentType) &&
parentType.getFields()[fieldValue]
) {
errors.push({
message: `Duplicate component field definition for ${parent}.${fieldValue}`,
filepath,
})
return
}

// if the type is abstract there's a problem
Expand Down

0 comments on commit 1000510

Please sign in to comment.