diff --git a/src/examples/auth-zero/src/frontend/types.generated.ts b/src/examples/auth-zero/src/frontend/types.generated.ts index 0d3480d51..a1240c126 100644 --- a/src/examples/auth-zero/src/frontend/types.generated.ts +++ b/src/examples/auth-zero/src/frontend/types.generated.ts @@ -168,6 +168,8 @@ export type AlbumUpdateInput = { }; export type AlbumsListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; albumId?: InputMaybe; albumId_gt?: InputMaybe; albumId_gte?: InputMaybe; @@ -230,6 +232,8 @@ export type ApiKeyUpdateInput = { }; export type ApiKeysListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; id?: InputMaybe; id_gt?: InputMaybe; id_gte?: InputMaybe; @@ -299,6 +303,8 @@ export type ArtistUpdateInput = { }; export type ArtistsListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; albums?: InputMaybe; artistId?: InputMaybe; artistId_gt?: InputMaybe; @@ -356,6 +362,8 @@ export type CredentialUpdateInput = { }; export type CredentialsListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; id?: InputMaybe; id_gt?: InputMaybe; id_gte?: InputMaybe; @@ -474,6 +482,8 @@ export type CustomerUpdateInput = { }; export type CustomersListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; address?: InputMaybe; address_gt?: InputMaybe; address_gte?: InputMaybe; @@ -763,6 +773,8 @@ export type EmployeeUpdateInput = { }; export type EmployeesListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; address?: InputMaybe; address_gt?: InputMaybe; address_gte?: InputMaybe; @@ -993,6 +1005,8 @@ export type GenreUpdateInput = { }; export type GenresListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; genreId?: InputMaybe; genreId_gt?: InputMaybe; genreId_gte?: InputMaybe; @@ -1151,6 +1165,8 @@ export type InvoiceLineUpdateInput = { }; export type InvoiceLinesListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; invoice?: InputMaybe; invoiceLineId?: InputMaybe; invoiceLineId_gt?: InputMaybe; @@ -1211,6 +1227,8 @@ export type InvoiceUpdateInput = { }; export type InvoicesListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; billingAddress?: InputMaybe; billingAddress_gt?: InputMaybe; billingAddress_gte?: InputMaybe; @@ -1364,6 +1382,8 @@ export type MediaTypeUpdateInput = { }; export type MediaTypesListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; mediaTypeId?: InputMaybe; mediaTypeId_gt?: InputMaybe; mediaTypeId_gte?: InputMaybe; @@ -1952,6 +1972,8 @@ export type PlaylistUpdateInput = { }; export type PlaylistsListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; name?: InputMaybe; name_gt?: InputMaybe; name_gte?: InputMaybe; @@ -2340,6 +2362,8 @@ export type TrackUpdateInput = { }; export type TracksListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; album?: InputMaybe; bytes?: InputMaybe; bytes_in?: InputMaybe>; diff --git a/src/examples/auth-zero/src/types.generated.ts b/src/examples/auth-zero/src/types.generated.ts index 0d3480d51..a1240c126 100644 --- a/src/examples/auth-zero/src/types.generated.ts +++ b/src/examples/auth-zero/src/types.generated.ts @@ -168,6 +168,8 @@ export type AlbumUpdateInput = { }; export type AlbumsListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; albumId?: InputMaybe; albumId_gt?: InputMaybe; albumId_gte?: InputMaybe; @@ -230,6 +232,8 @@ export type ApiKeyUpdateInput = { }; export type ApiKeysListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; id?: InputMaybe; id_gt?: InputMaybe; id_gte?: InputMaybe; @@ -299,6 +303,8 @@ export type ArtistUpdateInput = { }; export type ArtistsListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; albums?: InputMaybe; artistId?: InputMaybe; artistId_gt?: InputMaybe; @@ -356,6 +362,8 @@ export type CredentialUpdateInput = { }; export type CredentialsListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; id?: InputMaybe; id_gt?: InputMaybe; id_gte?: InputMaybe; @@ -474,6 +482,8 @@ export type CustomerUpdateInput = { }; export type CustomersListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; address?: InputMaybe; address_gt?: InputMaybe; address_gte?: InputMaybe; @@ -763,6 +773,8 @@ export type EmployeeUpdateInput = { }; export type EmployeesListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; address?: InputMaybe; address_gt?: InputMaybe; address_gte?: InputMaybe; @@ -993,6 +1005,8 @@ export type GenreUpdateInput = { }; export type GenresListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; genreId?: InputMaybe; genreId_gt?: InputMaybe; genreId_gte?: InputMaybe; @@ -1151,6 +1165,8 @@ export type InvoiceLineUpdateInput = { }; export type InvoiceLinesListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; invoice?: InputMaybe; invoiceLineId?: InputMaybe; invoiceLineId_gt?: InputMaybe; @@ -1211,6 +1227,8 @@ export type InvoiceUpdateInput = { }; export type InvoicesListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; billingAddress?: InputMaybe; billingAddress_gt?: InputMaybe; billingAddress_gte?: InputMaybe; @@ -1364,6 +1382,8 @@ export type MediaTypeUpdateInput = { }; export type MediaTypesListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; mediaTypeId?: InputMaybe; mediaTypeId_gt?: InputMaybe; mediaTypeId_gte?: InputMaybe; @@ -1952,6 +1972,8 @@ export type PlaylistUpdateInput = { }; export type PlaylistsListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; name?: InputMaybe; name_gt?: InputMaybe; name_gte?: InputMaybe; @@ -2340,6 +2362,8 @@ export type TrackUpdateInput = { }; export type TracksListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; album?: InputMaybe; bytes?: InputMaybe; bytes_in?: InputMaybe>; diff --git a/src/examples/aws-cognito/src/frontend/types.generated.ts b/src/examples/aws-cognito/src/frontend/types.generated.ts index e5a76a8bb..fa6646dff 100644 --- a/src/examples/aws-cognito/src/frontend/types.generated.ts +++ b/src/examples/aws-cognito/src/frontend/types.generated.ts @@ -156,6 +156,8 @@ export type CognitoUserUpdateInput = { }; export type CognitoUsersListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; attributes?: InputMaybe; attributes_gt?: InputMaybe; attributes_gte?: InputMaybe; diff --git a/src/examples/aws-cognito/src/types.generated.ts b/src/examples/aws-cognito/src/types.generated.ts index e5a76a8bb..fa6646dff 100644 --- a/src/examples/aws-cognito/src/types.generated.ts +++ b/src/examples/aws-cognito/src/types.generated.ts @@ -156,6 +156,8 @@ export type CognitoUserUpdateInput = { }; export type CognitoUsersListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; attributes?: InputMaybe; attributes_gt?: InputMaybe; attributes_gte?: InputMaybe; diff --git a/src/examples/databases/src/frontend/types.generated.ts b/src/examples/databases/src/frontend/types.generated.ts index ccac33ad2..0f9a93497 100644 --- a/src/examples/databases/src/frontend/types.generated.ts +++ b/src/examples/databases/src/frontend/types.generated.ts @@ -336,6 +336,8 @@ export type TaskUpdateInput = { }; export type TasksListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; createdAt?: InputMaybe; createdAt_gt?: InputMaybe; createdAt_gte?: InputMaybe; @@ -458,6 +460,8 @@ export type UserUpdateInput = { }; export type UsersListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; email?: InputMaybe; email_gt?: InputMaybe; email_gte?: InputMaybe; diff --git a/src/examples/databases/src/types.generated.ts b/src/examples/databases/src/types.generated.ts index ccac33ad2..0f9a93497 100644 --- a/src/examples/databases/src/types.generated.ts +++ b/src/examples/databases/src/types.generated.ts @@ -336,6 +336,8 @@ export type TaskUpdateInput = { }; export type TasksListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; createdAt?: InputMaybe; createdAt_gt?: InputMaybe; createdAt_gte?: InputMaybe; @@ -458,6 +460,8 @@ export type UserUpdateInput = { }; export type UsersListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; email?: InputMaybe; email_gt?: InputMaybe; email_gte?: InputMaybe; diff --git a/src/examples/federation/src/frontend/types.generated.ts b/src/examples/federation/src/frontend/types.generated.ts index c28878518..33c7aca56 100644 --- a/src/examples/federation/src/frontend/types.generated.ts +++ b/src/examples/federation/src/frontend/types.generated.ts @@ -231,6 +231,8 @@ export type ProductVariation = { }; export type ProductsListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; id?: InputMaybe; id_gt?: InputMaybe; id_gte?: InputMaybe; diff --git a/src/examples/federation/src/types.generated.ts b/src/examples/federation/src/types.generated.ts index c28878518..33c7aca56 100644 --- a/src/examples/federation/src/types.generated.ts +++ b/src/examples/federation/src/types.generated.ts @@ -231,6 +231,8 @@ export type ProductVariation = { }; export type ProductsListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; id?: InputMaybe; id_gt?: InputMaybe; id_gte?: InputMaybe; diff --git a/src/examples/microsoft-entra/src/frontend/types.generated.ts b/src/examples/microsoft-entra/src/frontend/types.generated.ts index 0d3480d51..a1240c126 100644 --- a/src/examples/microsoft-entra/src/frontend/types.generated.ts +++ b/src/examples/microsoft-entra/src/frontend/types.generated.ts @@ -168,6 +168,8 @@ export type AlbumUpdateInput = { }; export type AlbumsListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; albumId?: InputMaybe; albumId_gt?: InputMaybe; albumId_gte?: InputMaybe; @@ -230,6 +232,8 @@ export type ApiKeyUpdateInput = { }; export type ApiKeysListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; id?: InputMaybe; id_gt?: InputMaybe; id_gte?: InputMaybe; @@ -299,6 +303,8 @@ export type ArtistUpdateInput = { }; export type ArtistsListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; albums?: InputMaybe; artistId?: InputMaybe; artistId_gt?: InputMaybe; @@ -356,6 +362,8 @@ export type CredentialUpdateInput = { }; export type CredentialsListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; id?: InputMaybe; id_gt?: InputMaybe; id_gte?: InputMaybe; @@ -474,6 +482,8 @@ export type CustomerUpdateInput = { }; export type CustomersListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; address?: InputMaybe; address_gt?: InputMaybe; address_gte?: InputMaybe; @@ -763,6 +773,8 @@ export type EmployeeUpdateInput = { }; export type EmployeesListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; address?: InputMaybe; address_gt?: InputMaybe; address_gte?: InputMaybe; @@ -993,6 +1005,8 @@ export type GenreUpdateInput = { }; export type GenresListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; genreId?: InputMaybe; genreId_gt?: InputMaybe; genreId_gte?: InputMaybe; @@ -1151,6 +1165,8 @@ export type InvoiceLineUpdateInput = { }; export type InvoiceLinesListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; invoice?: InputMaybe; invoiceLineId?: InputMaybe; invoiceLineId_gt?: InputMaybe; @@ -1211,6 +1227,8 @@ export type InvoiceUpdateInput = { }; export type InvoicesListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; billingAddress?: InputMaybe; billingAddress_gt?: InputMaybe; billingAddress_gte?: InputMaybe; @@ -1364,6 +1382,8 @@ export type MediaTypeUpdateInput = { }; export type MediaTypesListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; mediaTypeId?: InputMaybe; mediaTypeId_gt?: InputMaybe; mediaTypeId_gte?: InputMaybe; @@ -1952,6 +1972,8 @@ export type PlaylistUpdateInput = { }; export type PlaylistsListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; name?: InputMaybe; name_gt?: InputMaybe; name_gte?: InputMaybe; @@ -2340,6 +2362,8 @@ export type TrackUpdateInput = { }; export type TracksListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; album?: InputMaybe; bytes?: InputMaybe; bytes_in?: InputMaybe>; diff --git a/src/examples/microsoft-entra/src/types.generated.ts b/src/examples/microsoft-entra/src/types.generated.ts index 0d3480d51..a1240c126 100644 --- a/src/examples/microsoft-entra/src/types.generated.ts +++ b/src/examples/microsoft-entra/src/types.generated.ts @@ -168,6 +168,8 @@ export type AlbumUpdateInput = { }; export type AlbumsListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; albumId?: InputMaybe; albumId_gt?: InputMaybe; albumId_gte?: InputMaybe; @@ -230,6 +232,8 @@ export type ApiKeyUpdateInput = { }; export type ApiKeysListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; id?: InputMaybe; id_gt?: InputMaybe; id_gte?: InputMaybe; @@ -299,6 +303,8 @@ export type ArtistUpdateInput = { }; export type ArtistsListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; albums?: InputMaybe; artistId?: InputMaybe; artistId_gt?: InputMaybe; @@ -356,6 +362,8 @@ export type CredentialUpdateInput = { }; export type CredentialsListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; id?: InputMaybe; id_gt?: InputMaybe; id_gte?: InputMaybe; @@ -474,6 +482,8 @@ export type CustomerUpdateInput = { }; export type CustomersListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; address?: InputMaybe; address_gt?: InputMaybe; address_gte?: InputMaybe; @@ -763,6 +773,8 @@ export type EmployeeUpdateInput = { }; export type EmployeesListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; address?: InputMaybe; address_gt?: InputMaybe; address_gte?: InputMaybe; @@ -993,6 +1005,8 @@ export type GenreUpdateInput = { }; export type GenresListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; genreId?: InputMaybe; genreId_gt?: InputMaybe; genreId_gte?: InputMaybe; @@ -1151,6 +1165,8 @@ export type InvoiceLineUpdateInput = { }; export type InvoiceLinesListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; invoice?: InputMaybe; invoiceLineId?: InputMaybe; invoiceLineId_gt?: InputMaybe; @@ -1211,6 +1227,8 @@ export type InvoiceUpdateInput = { }; export type InvoicesListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; billingAddress?: InputMaybe; billingAddress_gt?: InputMaybe; billingAddress_gte?: InputMaybe; @@ -1364,6 +1382,8 @@ export type MediaTypeUpdateInput = { }; export type MediaTypesListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; mediaTypeId?: InputMaybe; mediaTypeId_gt?: InputMaybe; mediaTypeId_gte?: InputMaybe; @@ -1952,6 +1972,8 @@ export type PlaylistUpdateInput = { }; export type PlaylistsListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; name?: InputMaybe; name_gt?: InputMaybe; name_gte?: InputMaybe; @@ -2340,6 +2362,8 @@ export type TrackUpdateInput = { }; export type TracksListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; album?: InputMaybe; bytes?: InputMaybe; bytes_in?: InputMaybe>; diff --git a/src/examples/rest-with-auth/src/frontend/types.generated.ts b/src/examples/rest-with-auth/src/frontend/types.generated.ts index 6c5535321..d66316392 100644 --- a/src/examples/rest-with-auth/src/frontend/types.generated.ts +++ b/src/examples/rest-with-auth/src/frontend/types.generated.ts @@ -140,6 +140,8 @@ export type ApiKeyUpdateInput = { }; export type ApiKeysListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; id?: InputMaybe; id_gt?: InputMaybe; id_gte?: InputMaybe; @@ -207,6 +209,8 @@ export type CredentialUpdateInput = { }; export type CredentialsListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; id?: InputMaybe; id_gt?: InputMaybe; id_gte?: InputMaybe; @@ -679,6 +683,8 @@ export type TagUpdateInput = { }; export type TagsListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; id?: InputMaybe; id_gt?: InputMaybe; id_gte?: InputMaybe; @@ -758,6 +764,8 @@ export type TaskCountByTagTag_AggregateArgs = { }; export type TaskCountByTagsListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; count?: InputMaybe; count_in?: InputMaybe>; count_ne?: InputMaybe; @@ -822,6 +830,8 @@ export type TaskUpdateInput = { }; export type TasksListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; description?: InputMaybe; description_gt?: InputMaybe; description_gte?: InputMaybe; @@ -915,6 +925,8 @@ export type Trace = { }; export type TracesListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; attributes?: InputMaybe; attributes_in?: InputMaybe>; attributes_ne?: InputMaybe; @@ -1038,6 +1050,8 @@ export type UserTasks_AggregateArgs = { }; export type UsersListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; name?: InputMaybe; name_gt?: InputMaybe; name_gte?: InputMaybe; diff --git a/src/examples/rest-with-auth/src/types.generated.ts b/src/examples/rest-with-auth/src/types.generated.ts index 6c5535321..d66316392 100644 --- a/src/examples/rest-with-auth/src/types.generated.ts +++ b/src/examples/rest-with-auth/src/types.generated.ts @@ -140,6 +140,8 @@ export type ApiKeyUpdateInput = { }; export type ApiKeysListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; id?: InputMaybe; id_gt?: InputMaybe; id_gte?: InputMaybe; @@ -207,6 +209,8 @@ export type CredentialUpdateInput = { }; export type CredentialsListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; id?: InputMaybe; id_gt?: InputMaybe; id_gte?: InputMaybe; @@ -679,6 +683,8 @@ export type TagUpdateInput = { }; export type TagsListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; id?: InputMaybe; id_gt?: InputMaybe; id_gte?: InputMaybe; @@ -758,6 +764,8 @@ export type TaskCountByTagTag_AggregateArgs = { }; export type TaskCountByTagsListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; count?: InputMaybe; count_in?: InputMaybe>; count_ne?: InputMaybe; @@ -822,6 +830,8 @@ export type TaskUpdateInput = { }; export type TasksListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; description?: InputMaybe; description_gt?: InputMaybe; description_gte?: InputMaybe; @@ -915,6 +925,8 @@ export type Trace = { }; export type TracesListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; attributes?: InputMaybe; attributes_in?: InputMaybe>; attributes_ne?: InputMaybe; @@ -1038,6 +1050,8 @@ export type UserTasks_AggregateArgs = { }; export type UsersListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; name?: InputMaybe; name_gt?: InputMaybe; name_gte?: InputMaybe; diff --git a/src/examples/rest-with-auth/types.generated.ts b/src/examples/rest-with-auth/types.generated.ts index 6c5535321..d66316392 100644 --- a/src/examples/rest-with-auth/types.generated.ts +++ b/src/examples/rest-with-auth/types.generated.ts @@ -140,6 +140,8 @@ export type ApiKeyUpdateInput = { }; export type ApiKeysListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; id?: InputMaybe; id_gt?: InputMaybe; id_gte?: InputMaybe; @@ -207,6 +209,8 @@ export type CredentialUpdateInput = { }; export type CredentialsListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; id?: InputMaybe; id_gt?: InputMaybe; id_gte?: InputMaybe; @@ -679,6 +683,8 @@ export type TagUpdateInput = { }; export type TagsListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; id?: InputMaybe; id_gt?: InputMaybe; id_gte?: InputMaybe; @@ -758,6 +764,8 @@ export type TaskCountByTagTag_AggregateArgs = { }; export type TaskCountByTagsListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; count?: InputMaybe; count_in?: InputMaybe>; count_ne?: InputMaybe; @@ -822,6 +830,8 @@ export type TaskUpdateInput = { }; export type TasksListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; description?: InputMaybe; description_gt?: InputMaybe; description_gte?: InputMaybe; @@ -915,6 +925,8 @@ export type Trace = { }; export type TracesListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; attributes?: InputMaybe; attributes_in?: InputMaybe>; attributes_ne?: InputMaybe; @@ -1038,6 +1050,8 @@ export type UserTasks_AggregateArgs = { }; export type UsersListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; name?: InputMaybe; name_gt?: InputMaybe; name_gte?: InputMaybe; diff --git a/src/examples/rest/src/frontend/types.generated.ts b/src/examples/rest/src/frontend/types.generated.ts index e428fe998..8e641fae9 100644 --- a/src/examples/rest/src/frontend/types.generated.ts +++ b/src/examples/rest/src/frontend/types.generated.ts @@ -117,6 +117,8 @@ export type DeleteOneFilterInput = { }; export type PeopleListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; birth_year?: InputMaybe; birth_year_gt?: InputMaybe; birth_year_gte?: InputMaybe; @@ -272,6 +274,8 @@ export type Vehicle = { }; export type VehiclesListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; cost_in_credits?: InputMaybe; cost_in_credits_gt?: InputMaybe; cost_in_credits_gte?: InputMaybe; diff --git a/src/examples/rest/src/types.generated.ts b/src/examples/rest/src/types.generated.ts index e428fe998..8e641fae9 100644 --- a/src/examples/rest/src/types.generated.ts +++ b/src/examples/rest/src/types.generated.ts @@ -117,6 +117,8 @@ export type DeleteOneFilterInput = { }; export type PeopleListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; birth_year?: InputMaybe; birth_year_gt?: InputMaybe; birth_year_gte?: InputMaybe; @@ -272,6 +274,8 @@ export type Vehicle = { }; export type VehiclesListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; cost_in_credits?: InputMaybe; cost_in_credits_gt?: InputMaybe; cost_in_credits_gte?: InputMaybe; diff --git a/src/examples/s3-storage/src/frontend/types.generated.ts b/src/examples/s3-storage/src/frontend/types.generated.ts index ee9c84102..534163e6f 100644 --- a/src/examples/s3-storage/src/frontend/types.generated.ts +++ b/src/examples/s3-storage/src/frontend/types.generated.ts @@ -142,6 +142,8 @@ export type GraphweaverMediaUpdateInput = { }; export type GraphweaverMediasListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; filename?: InputMaybe; filename_gt?: InputMaybe; filename_gte?: InputMaybe; @@ -304,6 +306,8 @@ export type SubmissionUpdateInput = { }; export type SubmissionsListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; id?: InputMaybe; id_gt?: InputMaybe; id_gte?: InputMaybe; diff --git a/src/examples/s3-storage/src/types.generated.ts b/src/examples/s3-storage/src/types.generated.ts index ee9c84102..534163e6f 100644 --- a/src/examples/s3-storage/src/types.generated.ts +++ b/src/examples/s3-storage/src/types.generated.ts @@ -142,6 +142,8 @@ export type GraphweaverMediaUpdateInput = { }; export type GraphweaverMediasListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; filename?: InputMaybe; filename_gt?: InputMaybe; filename_gte?: InputMaybe; @@ -304,6 +306,8 @@ export type SubmissionUpdateInput = { }; export type SubmissionsListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; id?: InputMaybe; id_gt?: InputMaybe; id_gte?: InputMaybe; diff --git a/src/examples/sqlite/src/frontend/types.generated.ts b/src/examples/sqlite/src/frontend/types.generated.ts index 9f5ab2f12..789e03604 100644 --- a/src/examples/sqlite/src/frontend/types.generated.ts +++ b/src/examples/sqlite/src/frontend/types.generated.ts @@ -172,6 +172,8 @@ export type AlbumUpdateInput = { }; export type AlbumsListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; albumId?: InputMaybe; albumId_gt?: InputMaybe; albumId_gte?: InputMaybe; @@ -249,6 +251,8 @@ export type ArtistUpdateInput = { }; export type ArtistsListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; albums?: InputMaybe; artistId?: InputMaybe; artistId_gt?: InputMaybe; @@ -380,6 +384,8 @@ export type CustomerUpdateInput = { }; export type CustomersListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; address?: InputMaybe; address_gt?: InputMaybe; address_gte?: InputMaybe; @@ -669,6 +675,8 @@ export type EmployeeUpdateInput = { }; export type EmployeesListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; address?: InputMaybe; address_gt?: InputMaybe; address_gte?: InputMaybe; @@ -900,6 +908,8 @@ export type GenreUpdateInput = { }; export type GenresListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; genreId?: InputMaybe; genreId_gt?: InputMaybe; genreId_gte?: InputMaybe; @@ -1058,6 +1068,8 @@ export type InvoiceLineUpdateInput = { }; export type InvoiceLinesListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; invoice?: InputMaybe; invoiceLineId?: InputMaybe; invoiceLineId_gt?: InputMaybe; @@ -1118,6 +1130,8 @@ export type InvoiceUpdateInput = { }; export type InvoicesListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; billingAddress?: InputMaybe; billingAddress_gt?: InputMaybe; billingAddress_gte?: InputMaybe; @@ -1271,6 +1285,8 @@ export type MediaTypeUpdateInput = { }; export type MediaTypesListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; mediaTypeId?: InputMaybe; mediaTypeId_gt?: InputMaybe; mediaTypeId_gte?: InputMaybe; @@ -1841,6 +1857,8 @@ export type PlaylistUpdateInput = { }; export type PlaylistsListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; name?: InputMaybe; name_gt?: InputMaybe; name_gte?: InputMaybe; @@ -2172,6 +2190,8 @@ export type TotalInvoicesByCustomerCustomer_AggregateArgs = { }; export type TotalInvoicesByCustomersListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; customer?: InputMaybe; customerId?: InputMaybe; customerId_gt?: InputMaybe; @@ -2222,6 +2242,8 @@ export type Trace = { }; export type TracesListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; attributes?: InputMaybe; attributes_in?: InputMaybe>; attributes_ne?: InputMaybe; @@ -2441,6 +2463,8 @@ export type TrackUpdateInput = { }; export type TracksListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; album?: InputMaybe; bytes?: InputMaybe; bytes_in?: InputMaybe>; diff --git a/src/examples/sqlite/src/types.generated.ts b/src/examples/sqlite/src/types.generated.ts index 9f5ab2f12..789e03604 100644 --- a/src/examples/sqlite/src/types.generated.ts +++ b/src/examples/sqlite/src/types.generated.ts @@ -172,6 +172,8 @@ export type AlbumUpdateInput = { }; export type AlbumsListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; albumId?: InputMaybe; albumId_gt?: InputMaybe; albumId_gte?: InputMaybe; @@ -249,6 +251,8 @@ export type ArtistUpdateInput = { }; export type ArtistsListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; albums?: InputMaybe; artistId?: InputMaybe; artistId_gt?: InputMaybe; @@ -380,6 +384,8 @@ export type CustomerUpdateInput = { }; export type CustomersListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; address?: InputMaybe; address_gt?: InputMaybe; address_gte?: InputMaybe; @@ -669,6 +675,8 @@ export type EmployeeUpdateInput = { }; export type EmployeesListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; address?: InputMaybe; address_gt?: InputMaybe; address_gte?: InputMaybe; @@ -900,6 +908,8 @@ export type GenreUpdateInput = { }; export type GenresListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; genreId?: InputMaybe; genreId_gt?: InputMaybe; genreId_gte?: InputMaybe; @@ -1058,6 +1068,8 @@ export type InvoiceLineUpdateInput = { }; export type InvoiceLinesListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; invoice?: InputMaybe; invoiceLineId?: InputMaybe; invoiceLineId_gt?: InputMaybe; @@ -1118,6 +1130,8 @@ export type InvoiceUpdateInput = { }; export type InvoicesListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; billingAddress?: InputMaybe; billingAddress_gt?: InputMaybe; billingAddress_gte?: InputMaybe; @@ -1271,6 +1285,8 @@ export type MediaTypeUpdateInput = { }; export type MediaTypesListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; mediaTypeId?: InputMaybe; mediaTypeId_gt?: InputMaybe; mediaTypeId_gte?: InputMaybe; @@ -1841,6 +1857,8 @@ export type PlaylistUpdateInput = { }; export type PlaylistsListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; name?: InputMaybe; name_gt?: InputMaybe; name_gte?: InputMaybe; @@ -2172,6 +2190,8 @@ export type TotalInvoicesByCustomerCustomer_AggregateArgs = { }; export type TotalInvoicesByCustomersListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; customer?: InputMaybe; customerId?: InputMaybe; customerId_gt?: InputMaybe; @@ -2222,6 +2242,8 @@ export type Trace = { }; export type TracesListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; attributes?: InputMaybe; attributes_in?: InputMaybe>; attributes_ne?: InputMaybe; @@ -2441,6 +2463,8 @@ export type TrackUpdateInput = { }; export type TracksListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; album?: InputMaybe; bytes?: InputMaybe; bytes_in?: InputMaybe>; diff --git a/src/examples/xero/src/frontend/types.generated.ts b/src/examples/xero/src/frontend/types.generated.ts index 6880641d4..2727246f8 100644 --- a/src/examples/xero/src/frontend/types.generated.ts +++ b/src/examples/xero/src/frontend/types.generated.ts @@ -83,6 +83,8 @@ export type AccountUpdateInput = { }; export type AccountsListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; code?: InputMaybe; code_gt?: InputMaybe; code_gte?: InputMaybe; @@ -445,6 +447,8 @@ export type ProfitAndLossRowUpdateInput = { }; export type ProfitAndLossRowsListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; account?: InputMaybe; accountId?: InputMaybe; accountId_gt?: InputMaybe; @@ -619,6 +623,8 @@ export type TenantUpdateInput = { }; export type TenantsListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; authEventId?: InputMaybe; authEventId_gt?: InputMaybe; authEventId_gte?: InputMaybe; diff --git a/src/examples/xero/src/types.generated.ts b/src/examples/xero/src/types.generated.ts index 6880641d4..2727246f8 100644 --- a/src/examples/xero/src/types.generated.ts +++ b/src/examples/xero/src/types.generated.ts @@ -83,6 +83,8 @@ export type AccountUpdateInput = { }; export type AccountsListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; code?: InputMaybe; code_gt?: InputMaybe; code_gte?: InputMaybe; @@ -445,6 +447,8 @@ export type ProfitAndLossRowUpdateInput = { }; export type ProfitAndLossRowsListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; account?: InputMaybe; accountId?: InputMaybe; accountId_gt?: InputMaybe; @@ -619,6 +623,8 @@ export type TenantUpdateInput = { }; export type TenantsListFilter = { + _and?: InputMaybe>>; + _or?: InputMaybe>>; authEventId?: InputMaybe; authEventId_gt?: InputMaybe; authEventId_gte?: InputMaybe; diff --git a/src/packages/core/src/query-manager.ts b/src/packages/core/src/query-manager.ts index 554bb02e1..6ea648562 100644 --- a/src/packages/core/src/query-manager.ts +++ b/src/packages/core/src/query-manager.ts @@ -47,6 +47,11 @@ const visit = async (currentEntityMetadata: EntityMetadata, currentFilter: any) return filter; }) ); + } else if (fieldName === '_not') { + // The _not is an exception because the value is not an array, but it is just like above, we need + // to visit on down the tree. + const { filter } = await visit(currentEntityMetadata, value); + currentFilter[fieldName] = filter; } else if (typeof value === 'object') { // Let's recurse. To do that we need to look up the field. const field = getFieldFromEntity(currentEntityMetadata, fieldName); diff --git a/src/packages/core/src/schema-builder.ts b/src/packages/core/src/schema-builder.ts index f7075912a..647a0adde 100644 --- a/src/packages/core/src/schema-builder.ts +++ b/src/packages/core/src/schema-builder.ts @@ -484,6 +484,14 @@ const filterTypeForEntity = ( fields: () => { const fields: ObjMap = {}; + // Add top level and/or/not + const selfFilter = filterTypeForEntity(entity, entityFilter); + fields['_and'] = { type: new GraphQLList(selfFilter) }; + fields['_or'] = { type: new GraphQLList(selfFilter) }; + + // There's currently a problem with the _not operator and MikroORM, so we're not adding it for now. + // fields['_not'] = { type: selfFilter }; + for (const field of Object.values(entity.fields)) { const fieldType = getFieldType(field); const metadata = graphweaverMetadata.metadataForType(fieldType); diff --git a/src/packages/end-to-end/src/__tests__/api/sqlite/issues/gh1388.test.ts b/src/packages/end-to-end/src/__tests__/api/sqlite/issues/gh1388.test.ts new file mode 100644 index 000000000..352cc5b5f --- /dev/null +++ b/src/packages/end-to-end/src/__tests__/api/sqlite/issues/gh1388.test.ts @@ -0,0 +1,91 @@ +import gql from 'graphql-tag'; +import assert from 'assert'; +import Graphweaver from '@exogee/graphweaver-server'; +import { Entity as DataEntity, Property, PrimaryKey } from '@mikro-orm/core'; +import { Field, ID, Entity } from '@exogee/graphweaver'; +import { ConnectionManager, MikroBackendProvider } from '@exogee/graphweaver-mikroorm'; + +import { resetDatabase } from '../../../../utils'; + +import { SqliteDriver } from '@mikro-orm/sqlite'; + +/** Setup entities and resolvers */ +@DataEntity({ tableName: 'Album' }) +class OrmAlbum { + @PrimaryKey({ fieldName: 'AlbumId', type: 'number' }) + id!: number; + + @Property({ fieldName: 'Title', type: 'string' }) + title!: string; +} + +const connection = { + connectionManagerId: 'sqlite', + mikroOrmConfig: { + entities: [OrmAlbum], + driver: SqliteDriver, + dbName: 'databases/database.sqlite', + }, +}; + +@Entity('Album', { + provider: new MikroBackendProvider(OrmAlbum, connection), +}) +export class Album { + @Field(() => ID) + id!: number; + + @Field(() => String) + title!: string; +} + +describe('Top level and/or/not', () => { + beforeEach(resetDatabase); + + test('should correctly emit _and/_or/_not', async () => { + const graphweaver = new Graphweaver(); + await ConnectionManager.connect('sqlite', connection); + + const response = await graphweaver.executeOperation({ + query: gql` + query { + albums(filter: { _and: [{ id: 5 }, { id: 6 }] }) { + id + title + } + } + `, + }); + assert(response.body.kind === 'single'); + expect(response.body.singleResult.errors).toBe(undefined); + expect(response.body.singleResult.data?.albums).toHaveLength(0); + + const response2 = await graphweaver.executeOperation({ + query: gql` + query { + albums(filter: { _or: [{ id: 5 }, { id: 6 }] }) { + id + title + } + } + `, + }); + assert(response2.body.kind === 'single'); + expect(response2.body.singleResult.errors).toBe(undefined); + expect(response2.body.singleResult.data?.albums).toHaveLength(2); + + // const response3 = await graphweaver.executeOperation({ + // query: gql` + // query { + // albums(filter: { id: { _not: 5 } }) { + // id + // title + // } + // } + // `, + // }); + // assert(response3.body.kind === 'single'); + // expect(response3.body.singleResult.errors).toBe(undefined); + // expect(response3.body.singleResult.data?.albums).toHaveLength(345); + }); +}); diff --git a/src/packages/mikroorm/src/provider/provider.ts b/src/packages/mikroorm/src/provider/provider.ts index 800d41d38..43d79f815 100644 --- a/src/packages/mikroorm/src/provider/provider.ts +++ b/src/packages/mikroorm/src/provider/provider.ts @@ -202,8 +202,12 @@ export class MikroBackendProvider implements BackendProvider { // Check for and/or/etc at the root level and handle correctly for (const rootLevelKey of Object.keys(values)) { if (mikroObjectOperations.has(rootLevelKey)) { - for (const field of values[rootLevelKey]) { - mapFieldNames(field); + if (Array.isArray(values[rootLevelKey])) { + for (const field of values[rootLevelKey]) { + mapFieldNames(field); + } + } else { + mapFieldNames(values[rootLevelKey]); } } } @@ -284,12 +288,6 @@ export class MikroBackendProvider implements BackendProvider { // Strip custom types out of the equation. // This query only works if we JSON.parse(JSON.stringify(filter)): - // - // query { - // drivers (filter: { region: { name: "North Shore" }}) { - // id - // } - // } const where = traceSync((trace?: TraceOptions) => { trace?.span.updateName('Convert filter to Mikro-Orm format'); return filter ? gqlToMikro(JSON.parse(JSON.stringify(filter))) : undefined;