Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

entgql: always skip sensitive fields #384

Merged
merged 1 commit into from
Oct 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions entgql/internal/todo/ent.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ Input was generated by ent.
"""
input CreateUserInput {
name: String
password: String
groupIDs: [ID!]
friendIDs: [ID!]
}
Expand Down Expand Up @@ -504,6 +505,8 @@ Input was generated by ent.
"""
input UpdateUserInput {
name: String
clearPassword: Boolean
password: String
addGroupIDs: [ID!]
removeGroupIDs: [ID!]
addFriendIDs: [ID!]
Expand Down
12 changes: 12 additions & 0 deletions entgql/internal/todo/ent/gql_mutation_input.go

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

10 changes: 9 additions & 1 deletion entgql/internal/todo/ent/gql_node.go

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

62 changes: 62 additions & 0 deletions entgql/internal/todo/ent/gql_where_input.go

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

1 change: 1 addition & 0 deletions entgql/internal/todo/ent/migrate/schema.go

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

80 changes: 78 additions & 2 deletions entgql/internal/todo/ent/mutation.go

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

3 changes: 3 additions & 0 deletions entgql/internal/todo/ent/schema/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ func (User) Fields() []ent.Field {
return []ent.Field{
field.String("name").
Default("Anonymous"),
field.String("password").
Sensitive().
Optional(),
}
}

Expand Down
12 changes: 11 additions & 1 deletion entgql/internal/todo/ent/user.go

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

3 changes: 3 additions & 0 deletions entgql/internal/todo/ent/user/user.go

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

Loading