Skip to content

Commit

Permalink
feat: ignore repeat for _count on graphql document.
Browse files Browse the repository at this point in the history
  • Loading branch information
xufeixiang committed Jul 11, 2024
1 parent 27b1f90 commit 6ce19a7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/engine/build/operations_graphql_document.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ func (i *QueryDocumentItem) resolveSelectionSet(datasourceQuote string, selectio
if ok {
fieldDefinition := definition.Fields[fieldDefIndex]
if !datasource.ContainsRootDefinition(definition.Name, fieldDefinition.Type.Name()) &&
(len(fieldDefinition.Arguments) > 0 || len(field.SelectionSet) == 0) &&
slices.ContainsFunc(savedSet, func(selection ast.Selection) bool {
savedField, saved := selection.(*ast.Field)
return saved && savedField.Name == field.Name
Expand Down

0 comments on commit 6ce19a7

Please sign in to comment.