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

Set isFilterable to false in examples where read access is false #8247

Merged
merged 1 commit into from
Jan 16, 2023
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
6 changes: 0 additions & 6 deletions examples/basic/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ input UserWhereInput {
name: StringFilter
email: StringFilter
password: PasswordFilter
isAdmin: BooleanFilter
roles: StringFilter
phoneNumbers: PhoneNumberManyRelationFilter
posts: PostManyRelationFilter
Expand Down Expand Up @@ -105,11 +104,6 @@ input PasswordFilter {
isSet: Boolean!
}

input BooleanFilter {
equals: Boolean
not: BooleanFilter
}

input PhoneNumberManyRelationFilter {
every: PhoneNumberWhereInput
some: PhoneNumberWhereInput
Expand Down
1 change: 1 addition & 0 deletions examples/basic/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ const User: Lists.User = list({
create: access.isAdmin,
update: access.isAdmin,
},
isFilterable: false,
ui: {
createView: {
fieldMode: args => (access.isAdmin(args) ? 'edit' : 'hidden'),
Expand Down
1 change: 0 additions & 1 deletion examples/custom-session-validation/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ input PersonWhereInput {
id: IDFilter
name: StringFilter
email: StringFilter
passwordChangedAt: DateTimeNullableFilter
tasks: TaskManyRelationFilter
}

Expand Down
1 change: 1 addition & 0 deletions examples/custom-session-validation/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export const lists = {
passwordChangedAt: timestamp({
// Don't allow the passwordChangedAt field to be set by the user.
access: () => false,
isFilterable: false,
hooks: {
resolveInput: ({ resolvedData }) => {
// If the password has been changed, update the passwordChangedAt field to the current time.
Expand Down