Skip to content

Commit

Permalink
✨ skip private type
Browse files Browse the repository at this point in the history
  • Loading branch information
bannzai committed Jan 12, 2022
1 parent 69d3ecc commit 5de6fe3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions nodecheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ func run(excludes string) func(pass *gqlanalysis.Pass) (interface{}, error) {
}

for _, t := range needToNodeTypes {
// Skip private type. e.g) __Directive, __Enum ...
if strings.HasPrefix("__") {
break
}
pass.Reportf(t.Position, "%+v should conform to Node", t.Name)
}

Expand Down

0 comments on commit 5de6fe3

Please sign in to comment.