Skip to content

Commit

Permalink
don't add hidden struct fields to graphql (#1851)
Browse files Browse the repository at this point in the history
  • Loading branch information
lolopinto authored Nov 14, 2024
1 parent 566a8b0 commit b86e12f
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.

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

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

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

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

4 changes: 2 additions & 2 deletions examples/simple/src/graphql/generated/schema.gql

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

2 changes: 2 additions & 0 deletions examples/simple/src/graphql/generated/schema.ts

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

1 change: 1 addition & 0 deletions examples/simple/src/graphql/resolvers/internal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export * from "../generated/resolvers/user_super_nested_object_type";
export * from "../generated/resolvers/address_type";
export * from "../generated/resolvers/comment_type";
export * from "../generated/resolvers/contact_email_type";
export * from "../generated/resolvers/contact_info_type";
export * from "../generated/resolvers/contact_phone_number_type";
export * from "../generated/resolvers/contact_type";
export * from "../generated/resolvers/event_type";
Expand Down
3 changes: 3 additions & 0 deletions internal/graphql/generate_ts_code.go
Original file line number Diff line number Diff line change
Expand Up @@ -3362,6 +3362,9 @@ func buildCustomInterfaceNode(processor *codegen.Processor, ci *customtype.Custo
}

for _, f := range ci.Fields {
if !f.ExposeToGraphQL() {
continue
}
ft := &fieldType{
Name: f.GetGraphQLName(),
FieldImports: getGQLFileImports(f.GetTSGraphQLTypeForFieldImports(ciInfo.input), ciInfo.input),
Expand Down

0 comments on commit b86e12f

Please sign in to comment.