Skip to content

Commit

Permalink
generated go code
Browse files Browse the repository at this point in the history
  • Loading branch information
Code-Hex committed Apr 30, 2021
1 parent 1efc152 commit 91b5478
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 14 deletions.
3 changes: 2 additions & 1 deletion codegen/testserver/directive.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ directive @logged(id: UUID!) on FIELD
directive @toNull on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION | FIELD_DEFINITION
directive @directive1 on FIELD_DEFINITION
directive @directive2 on FIELD_DEFINITION
directive @directive3 on INPUT_OBJECT
directive @unimplemented on FIELD_DEFINITION
directive @order1(location: String!) repeatable on FIELD_DEFINITION | OBJECT
directive @order2(location: String!) on OBJECT
Expand All @@ -30,7 +31,7 @@ extend type Subscription {
directiveUnimplemented: String @unimplemented
}

input InputDirectives {
input InputDirectives @directive3 {
text: String! @length(min: 0, max: 7, message: "not valid")
nullableText: String @toNull
inner: InnerDirectives!
Expand Down
3 changes: 3 additions & 0 deletions codegen/testserver/directive_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ func TestDirectives(t *testing.T) {
Directive2: func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) {
return next(ctx)
},
Directive3: func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) {
return next(ctx)
},
Order1: func(ctx context.Context, obj interface{}, next graphql.Resolver, location string) (res interface{}, err error) {
order := []string{location}
res, err = next(ctx)
Expand Down
78 changes: 67 additions & 11 deletions codegen/testserver/generated.go

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

18 changes: 16 additions & 2 deletions example/type-system-extension/generated.go

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

0 comments on commit 91b5478

Please sign in to comment.