Skip to content

Commit

Permalink
fix 1864 (#1873)
Browse files Browse the repository at this point in the history
  • Loading branch information
lolopinto authored Jan 14, 2025
1 parent 62fa586 commit 82f9ee6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/simple/src/schema/patterns/contact_info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ export default class ContactInfo implements Pattern {
tsType: "ContactInfoExtra",
graphQLType: "ContactInfoExtra",
nullable: true,
// privacyPolicy: {
// // To test generation of privacy policies in patterns
// rules: [AlwaysAllowRule],
// this is disabled because there's a bug with custom inputs exposing `_extra` instead of `extra`
// },
fields: {
// e.g. default email or phone number
default: BooleanType(),
Expand Down
3 changes: 3 additions & 0 deletions internal/tscode/base.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,9 @@ implements {{useImport "Ent"}}<{{$viewerType}}>
{{$node := .Node}}
{{range $field := .FieldInfo.EntFields -}}
{{ if $field.HasAsyncAccessor $cfg -}}
{{ range $field.GetTsTypeImports -}}
{{$typ := useImportMaybe .Import -}}
{{end -}}
async {{$field.TSPublicAPIName}}(): Promise<{{$field.TsType}}> {
{{ $fieldName := $field.TsFieldName $cfg -}}
{{ if $field.FetchOnDemand -}}
Expand Down

0 comments on commit 82f9ee6

Please sign in to comment.