Skip to content

Commit

Permalink
Add repeated tag test
Browse files Browse the repository at this point in the history
  • Loading branch information
tprebs committed Nov 1, 2021
1 parent ae14c19 commit d1c69eb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions plugin/modelgen/models_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ func TestModelGeneration(t *testing.T) {
`json:"name" anotherTag:"tag"`,
`json:"enum" yetAnotherTag:"12"`,
`json:"noVal" yaml:"noVal"`,
`json:"repeated" someTag:"value" repeated:"true"`,
}

for _, tag := range expectedTags {
Expand Down
7 changes: 4 additions & 3 deletions plugin/modelgen/out/generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion plugin/modelgen/testdata/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ input ExistingInput {
type FieldMutationHook {
name: String @goTag(key :"anotherTag", value: "tag")
enum: ExistingEnum @goTag(key: "yetAnotherTag", value: "12")
noVal: String @goTag(key: "yaml")
noVal: String @goTag(key: "yaml") @goTag(key : "repeated", value: "true")
repeated: String @goTag(key: "someTag", value: "value") @goTag(key : "repeated", value: "true")

}

enum ExistingEnum {
Expand Down

0 comments on commit d1c69eb

Please sign in to comment.