Skip to content

Commit

Permalink
update error so it's clearer when there's duplicate GraphQL names
Browse files Browse the repository at this point in the history
  • Loading branch information
lolopinto committed Nov 17, 2024
1 parent f004b22 commit 2911b28
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions docker_CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ Changelog for the npm version are [here](/CHANGELOG.md).

## [Unreleased]

### Added

- Updated error when there's duplicate names in generated GraphQL Schema (#1857)

## [0.2.0-alpha.9] - 2024-11-11

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion internal/schema/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -1084,7 +1084,7 @@ func (s *Schema) loadExistingEdges() (*assocEdgeData, error) {
// ExposeToGraphQL() bool
func (s *Schema) addGQLType(name string) error {
if s.gqlTypeMap[name] {
return fmt.Errorf("there's already an entity with GraphQL name %s", name)
return fmt.Errorf("there's already an entity with GraphQL name %s. Maybe Node and Pattern with the same name?", name)
}
s.gqlTypeMap[name] = true
return nil
Expand Down

0 comments on commit 2911b28

Please sign in to comment.