Skip to content

Commit

Permalink
drop generated Campaign input objects, update struct tags
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbloss committed Jan 2, 2025
1 parent 4f11cd1 commit 1fed6b9
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 94 deletions.
9 changes: 6 additions & 3 deletions gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,14 @@ var listExamples = map[string]string{

var scalarExamples = map[string]string{
"Boolean": "false",
"Float": "4.2069",
"ID": "Z2lkOi8vc2VydmljZS8xMjM0NTY3ODk",
"Int": "3",
"ISO8601DateTime": "2025-01-05T01:00:00.000Z",
"Float": "4.2069",
"String": "example_value",
"Int": "3",
"JSON": `{\"name\":\"my-big-query\",\"engine\":\"BigQuery\",\"endpoint\":\"https://google.com\",\"replica\":false}`,
"JSONSchema": `SCHEMA_TBD`,
"JsonString": "JSON_TBD",
"String": "example_value",
}

var knownTypeMappings = map[string]string{
Expand Down Expand Up @@ -973,6 +973,9 @@ func exampleStructTag(field *types.InputValueDefinition) string {
var exampleValue string
var unwrappedType types.Type

if field.Name.Name == "externalId" {
return fmt.Sprintf(` example:"%s"`, scalarExamples["ID"])
}
if nonNullType, ok := field.Type.(*types.NonNull); ok {
unwrappedType = nonNullType.OfType
} else {
Expand Down
109 changes: 18 additions & 91 deletions input.go

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

0 comments on commit 1fed6b9

Please sign in to comment.