Skip to content

Commit

Permalink
Merge pull request #638 from dackroyd/fix-missing-names-function
Browse files Browse the repository at this point in the history
      Fix Missing Names Function
  • Loading branch information
pavelnikolov authored Apr 6, 2024
2 parents cd26a0e + 4fc5659 commit c765547
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ast/argument.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,12 @@ func (a ArgumentsDefinition) Get(name string) *InputValueDefinition {
}
return nil
}

// Names returns a slice of ArgumentsDefinition names.
func (a ArgumentsDefinition) Names() []string {
names := make([]string, len(a))
for i, f := range a {
names[i] = f.Name.Name
}
return names
}

0 comments on commit c765547

Please sign in to comment.