diff --git a/arion-compose/services/engine.nix b/arion-compose/services/engine.nix index b520948b..34f2f004 100644 --- a/arion-compose/services/engine.nix +++ b/arion-compose/services/engine.nix @@ -63,9 +63,8 @@ let connectors)); auth-config = pkgs.writeText "auth_config.json" (builtins.toJSON { - version = "v1"; + version = "v2"; definition = { - allowRoleEmulationBy = "admin"; mode.webhook = { url = auth-webhook.url; method = "Post"; diff --git a/fixtures/hasura/chinook/metadata/ArtistsWithAlbumsAndTracks.hml b/fixtures/hasura/chinook/metadata/ArtistsWithAlbumsAndTracks.hml index 43308e50..9070d45b 100644 --- a/fixtures/hasura/chinook/metadata/ArtistsWithAlbumsAndTracks.hml +++ b/fixtures/hasura/chinook/metadata/ArtistsWithAlbumsAndTracks.hml @@ -5,14 +5,14 @@ definition: name: AlbumWithTracks fields: - name: id - type: Chinook_ObjectId! + type: ObjectId! - name: title type: String! - name: tracks type: "[Track!]!" graphql: - typeName: Chinook_AlbumWithTracks - inputTypeName: Chinook_AlbumWithTracksInput + typeName: AlbumWithTracks + inputTypeName: AlbumWithTracksInput dataConnectorTypeMapping: - dataConnectorName: chinook dataConnectorObjectType: AlbumWithTracks @@ -40,6 +40,27 @@ definition: - title - tracks +--- +kind: BooleanExpressionType +version: v1 +definition: + name: AlbumWithTracksComparisonExp + operand: + object: + type: AlbumWithTracks + comparableFields: + - fieldName: id + booleanExpressionType: ObjectIdComparisonExp + - fieldName: title + booleanExpressionType: StringComparisonExp + comparableRelationships: [] + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: AlbumWithTracksComparisonExp + --- kind: ObjectType version: v1 @@ -47,14 +68,14 @@ definition: name: ArtistWithAlbumsAndTracks fields: - name: id - type: Chinook_ObjectId! + type: ObjectId! - name: albums type: "[AlbumWithTracks!]!" - name: name type: String! graphql: - typeName: Chinook_ArtistWithAlbumsAndTracks - inputTypeName: Chinook_ArtistWithAlbumsAndTracksInput + typeName: ArtistWithAlbumsAndTracks + inputTypeName: ArtistWithAlbumsAndTracksInput dataConnectorTypeMapping: - dataConnectorName: chinook dataConnectorObjectType: ArtistWithAlbumsAndTracks @@ -83,25 +104,25 @@ definition: - name --- -kind: ObjectBooleanExpressionType +kind: BooleanExpressionType version: v1 definition: - name: ArtistWithAlbumsAndTracksBoolExp - objectType: ArtistWithAlbumsAndTracks - dataConnectorName: chinook - dataConnectorObjectType: ArtistWithAlbumsAndTracks - comparableFields: - - fieldName: id - operators: - enableAll: true - - fieldName: albums - operators: - enableAll: true - - fieldName: name - operators: - enableAll: true + name: ArtistWithAlbumsAndTracksComparisonExp + operand: + object: + type: ArtistWithAlbumsAndTracks + comparableFields: + - fieldName: id + booleanExpressionType: ObjectIdComparisonExp + - fieldName: name + booleanExpressionType: StringComparisonExp + comparableRelationships: [] + logicalOperators: + enable: true + isNull: + enable: true graphql: - typeName: Chinook_ArtistWithAlbumsAndTracksBoolExp + typeName: ArtistWithAlbumsAndTracksComparisonExp --- kind: Model @@ -112,7 +133,7 @@ definition: source: dataConnectorName: chinook collection: artists_with_albums_and_tracks - filterExpressionType: ArtistWithAlbumsAndTracksBoolExp + filterExpressionType: ArtistWithAlbumsAndTracksComparisonExp orderableFields: - fieldName: id orderByDirections: @@ -130,7 +151,7 @@ definition: - queryRootField: artistsWithAlbumsAndTracksById uniqueIdentifier: - id - orderByExpressionType: Chinook_ArtistsWithAlbumsAndTracksOrderBy + orderByExpressionType: ArtistsWithAlbumsAndTracksOrderBy description: combines artist, albums, and tracks into a single document per artist --- diff --git a/fixtures/hasura/chinook/metadata/chinook-types.hml b/fixtures/hasura/chinook/metadata/chinook-types.hml deleted file mode 100644 index 4847339b..00000000 --- a/fixtures/hasura/chinook/metadata/chinook-types.hml +++ /dev/null @@ -1,92 +0,0 @@ ---- -kind: ScalarType -version: v1 -definition: - name: Chinook_ObjectId - graphql: - typeName: Chinook_ObjectId - ---- -kind: DataConnectorScalarRepresentation -version: v1 -definition: - dataConnectorName: chinook - dataConnectorScalarType: ObjectId - representation: Chinook_ObjectId - graphql: - comparisonExpressionTypeName: Chinook_ObjectIdComparisonExp - ---- -kind: DataConnectorScalarRepresentation -version: v1 -definition: - dataConnectorName: chinook - dataConnectorScalarType: Int - representation: Int - graphql: - comparisonExpressionTypeName: Chinook_IntComparisonExp - ---- -kind: ScalarType -version: v1 -definition: - name: Chinook_Double - graphql: - typeName: Chinook_Double - ---- -kind: DataConnectorScalarRepresentation -version: v1 -definition: - dataConnectorName: chinook - dataConnectorScalarType: Double - representation: Double - graphql: - comparisonExpressionTypeName: Chinook_DoubleComparisonExp - ---- -kind: ScalarType -version: v1 -definition: - name: Chinook_Decimal - graphql: - typeName: Chinook_Decimal - ---- -kind: DataConnectorScalarRepresentation -version: v1 -definition: - dataConnectorName: chinook - dataConnectorScalarType: Decimal - representation: Chinook_Decimal - graphql: - comparisonExpressionTypeName: Chinook_DecimalComparisonExp - ---- -kind: DataConnectorScalarRepresentation -version: v1 -definition: - dataConnectorName: chinook - dataConnectorScalarType: String - representation: String - graphql: - comparisonExpressionTypeName: Chinook_StringComparisonExp - ---- -kind: ScalarType -version: v1 -definition: - name: Chinook_ExtendedJson - graphql: - typeName: Chinook_ExtendedJson - ---- -kind: DataConnectorScalarRepresentation -version: v1 -definition: - dataConnectorName: chinook - dataConnectorScalarType: ExtendedJSON - representation: Chinook_ExtendedJson - graphql: - comparisonExpressionTypeName: Chinook_ExtendedJsonComparisonExp - diff --git a/fixtures/hasura/chinook/metadata/commands/InsertArtist.hml b/fixtures/hasura/chinook/metadata/commands/InsertArtist.hml index a538819c..5988d7f3 100644 --- a/fixtures/hasura/chinook/metadata/commands/InsertArtist.hml +++ b/fixtures/hasura/chinook/metadata/commands/InsertArtist.hml @@ -40,7 +40,7 @@ definition: inputTypeName: InsertArtistInput fields: - name: ok - type: Chinook_Double! + type: Float! - name: n type: Int! dataConnectorTypeMapping: diff --git a/fixtures/hasura/chinook/metadata/commands/UpdateTrackPrices.hml b/fixtures/hasura/chinook/metadata/commands/UpdateTrackPrices.hml index 4c6917dc..6e8f985a 100644 --- a/fixtures/hasura/chinook/metadata/commands/UpdateTrackPrices.hml +++ b/fixtures/hasura/chinook/metadata/commands/UpdateTrackPrices.hml @@ -6,9 +6,9 @@ definition: outputType: InsertArtist! arguments: - name: newPrice - type: Chinook_Decimal! + type: Decimal! - name: where - type: TrackBoolExp! + type: TrackComparisonExp! source: dataConnectorName: chinook dataConnectorCommand: diff --git a/fixtures/hasura/chinook/metadata/models/Album.hml b/fixtures/hasura/chinook/metadata/models/Album.hml index be6847fa..79d9651d 100644 --- a/fixtures/hasura/chinook/metadata/models/Album.hml +++ b/fixtures/hasura/chinook/metadata/models/Album.hml @@ -5,7 +5,7 @@ definition: name: Album fields: - name: id - type: Chinook_ObjectId! + type: ObjectId! - name: albumId type: Int! - name: artistId @@ -48,28 +48,33 @@ definition: - title --- -kind: ObjectBooleanExpressionType +kind: BooleanExpressionType version: v1 definition: - name: AlbumBoolExp - objectType: Album - dataConnectorName: chinook - dataConnectorObjectType: Album - comparableFields: - - fieldName: id - operators: - enableAll: true - - fieldName: albumId - operators: - enableAll: true - - fieldName: artistId - operators: - enableAll: true - - fieldName: title - operators: - enableAll: true + name: AlbumComparisonExp + operand: + object: + type: Album + comparableFields: + - fieldName: id + booleanExpressionType: ObjectIdComparisonExp + - fieldName: albumId + booleanExpressionType: IntComparisonExp + - fieldName: artistId + booleanExpressionType: IntComparisonExp + - fieldName: title + booleanExpressionType: StringComparisonExp + comparableRelationships: + - relationshipName: artist + booleanExpressionType: ArtistComparisonExp + - relationshipName: tracks + booleanExpressionType: TrackComparisonExp + logicalOperators: + enable: true + isNull: + enable: true graphql: - typeName: AlbumBoolExp + typeName: AlbumComparisonExp --- kind: Model @@ -80,7 +85,7 @@ definition: source: dataConnectorName: chinook collection: Album - filterExpressionType: AlbumBoolExp + filterExpressionType: AlbumComparisonExp orderableFields: - fieldName: id orderByDirections: diff --git a/fixtures/hasura/chinook/metadata/models/Artist.hml b/fixtures/hasura/chinook/metadata/models/Artist.hml index aadf44bb..bcb4ff50 100644 --- a/fixtures/hasura/chinook/metadata/models/Artist.hml +++ b/fixtures/hasura/chinook/metadata/models/Artist.hml @@ -5,7 +5,7 @@ definition: name: Artist fields: - name: id - type: Chinook_ObjectId! + type: ObjectId! - name: artistId type: Int! - name: name @@ -42,25 +42,29 @@ definition: - name --- -kind: ObjectBooleanExpressionType +kind: BooleanExpressionType version: v1 definition: - name: ArtistBoolExp - objectType: Artist - dataConnectorName: chinook - dataConnectorObjectType: Artist - comparableFields: - - fieldName: id - operators: - enableAll: true - - fieldName: artistId - operators: - enableAll: true - - fieldName: name - operators: - enableAll: true + name: ArtistComparisonExp + operand: + object: + type: Artist + comparableFields: + - fieldName: id + booleanExpressionType: ObjectIdComparisonExp + - fieldName: artistId + booleanExpressionType: IntComparisonExp + - fieldName: name + booleanExpressionType: StringComparisonExp + comparableRelationships: + - relationshipName: albums + booleanExpressionType: AlbumComparisonExp + logicalOperators: + enable: true + isNull: + enable: true graphql: - typeName: ArtistBoolExp + typeName: ArtistComparisonExp --- kind: Model @@ -71,7 +75,7 @@ definition: source: dataConnectorName: chinook collection: Artist - filterExpressionType: ArtistBoolExp + filterExpressionType: ArtistComparisonExp orderableFields: - fieldName: id orderByDirections: diff --git a/fixtures/hasura/chinook/metadata/models/Customer.hml b/fixtures/hasura/chinook/metadata/models/Customer.hml index 10233562..3a707bcb 100644 --- a/fixtures/hasura/chinook/metadata/models/Customer.hml +++ b/fixtures/hasura/chinook/metadata/models/Customer.hml @@ -5,7 +5,7 @@ definition: name: Customer fields: - name: id - type: Chinook_ObjectId! + type: ObjectId! - name: address type: String - name: city @@ -108,58 +108,53 @@ definition: - supportRepId --- -kind: ObjectBooleanExpressionType +kind: BooleanExpressionType version: v1 definition: - name: CustomerBoolExp - objectType: Customer - dataConnectorName: chinook - dataConnectorObjectType: Customer - comparableFields: - - fieldName: id - operators: - enableAll: true - - fieldName: address - operators: - enableAll: true - - fieldName: city - operators: - enableAll: true - - fieldName: company - operators: - enableAll: true - - fieldName: country - operators: - enableAll: true - - fieldName: customerId - operators: - enableAll: true - - fieldName: email - operators: - enableAll: true - - fieldName: fax - operators: - enableAll: true - - fieldName: firstName - operators: - enableAll: true - - fieldName: lastName - operators: - enableAll: true - - fieldName: phone - operators: - enableAll: true - - fieldName: postalCode - operators: - enableAll: true - - fieldName: state - operators: - enableAll: true - - fieldName: supportRepId - operators: - enableAll: true + name: CustomerComparisonExp + operand: + object: + type: Customer + comparableFields: + - fieldName: id + booleanExpressionType: ObjectIdComparisonExp + - fieldName: address + booleanExpressionType: StringComparisonExp + - fieldName: city + booleanExpressionType: StringComparisonExp + - fieldName: company + booleanExpressionType: StringComparisonExp + - fieldName: country + booleanExpressionType: StringComparisonExp + - fieldName: customerId + booleanExpressionType: IntComparisonExp + - fieldName: email + booleanExpressionType: StringComparisonExp + - fieldName: fax + booleanExpressionType: StringComparisonExp + - fieldName: firstName + booleanExpressionType: StringComparisonExp + - fieldName: lastName + booleanExpressionType: StringComparisonExp + - fieldName: phone + booleanExpressionType: StringComparisonExp + - fieldName: postalCode + booleanExpressionType: StringComparisonExp + - fieldName: state + booleanExpressionType: StringComparisonExp + - fieldName: supportRepId + booleanExpressionType: IntComparisonExp + comparableRelationships: + - relationshipName: invoices + booleanExpressionType: InvoiceComparisonExp + - relationshipName: supportRep + booleanExpressionType: EmployeeComparisonExp + logicalOperators: + enable: true + isNull: + enable: true graphql: - typeName: CustomerBoolExp + typeName: CustomerComparisonExp --- kind: Model @@ -170,7 +165,7 @@ definition: source: dataConnectorName: chinook collection: Customer - filterExpressionType: CustomerBoolExp + filterExpressionType: CustomerComparisonExp orderableFields: - fieldName: id orderByDirections: diff --git a/fixtures/hasura/chinook/metadata/models/Employee.hml b/fixtures/hasura/chinook/metadata/models/Employee.hml index 79af5edb..be33d8b0 100644 --- a/fixtures/hasura/chinook/metadata/models/Employee.hml +++ b/fixtures/hasura/chinook/metadata/models/Employee.hml @@ -5,7 +5,7 @@ definition: name: Employee fields: - name: id - type: Chinook_ObjectId! + type: ObjectId! - name: address type: String - name: birthDate @@ -120,64 +120,59 @@ definition: - title --- -kind: ObjectBooleanExpressionType +kind: BooleanExpressionType version: v1 definition: - name: EmployeeBoolExp - objectType: Employee - dataConnectorName: chinook - dataConnectorObjectType: Employee - comparableFields: - - fieldName: id - operators: - enableAll: true - - fieldName: address - operators: - enableAll: true - - fieldName: birthDate - operators: - enableAll: true - - fieldName: city - operators: - enableAll: true - - fieldName: country - operators: - enableAll: true - - fieldName: email - operators: - enableAll: true - - fieldName: employeeId - operators: - enableAll: true - - fieldName: fax - operators: - enableAll: true - - fieldName: firstName - operators: - enableAll: true - - fieldName: hireDate - operators: - enableAll: true - - fieldName: lastName - operators: - enableAll: true - - fieldName: phone - operators: - enableAll: true - - fieldName: postalCode - operators: - enableAll: true - - fieldName: reportsTo - operators: - enableAll: true - - fieldName: state - operators: - enableAll: true - - fieldName: title - operators: - enableAll: true + name: EmployeeComparisonExp + operand: + object: + type: Employee + comparableFields: + - fieldName: id + booleanExpressionType: ObjectIdComparisonExp + - fieldName: address + booleanExpressionType: StringComparisonExp + - fieldName: birthDate + booleanExpressionType: StringComparisonExp + - fieldName: city + booleanExpressionType: StringComparisonExp + - fieldName: country + booleanExpressionType: StringComparisonExp + - fieldName: email + booleanExpressionType: StringComparisonExp + - fieldName: employeeId + booleanExpressionType: IntComparisonExp + - fieldName: fax + booleanExpressionType: StringComparisonExp + - fieldName: firstName + booleanExpressionType: StringComparisonExp + - fieldName: hireDate + booleanExpressionType: StringComparisonExp + - fieldName: lastName + booleanExpressionType: StringComparisonExp + - fieldName: phone + booleanExpressionType: StringComparisonExp + - fieldName: postalCode + booleanExpressionType: StringComparisonExp + - fieldName: reportsTo + booleanExpressionType: IntComparisonExp + - fieldName: state + booleanExpressionType: StringComparisonExp + - fieldName: title + booleanExpressionType: StringComparisonExp + comparableRelationships: + - relationshipName: directReports + booleanExpressionType: EmployeeComparisonExp + - relationshipName: manager + booleanExpressionType: EmployeeComparisonExp + - relationshipName: supportRepCustomers + booleanExpressionType: CustomerComparisonExp + logicalOperators: + enable: true + isNull: + enable: true graphql: - typeName: EmployeeBoolExp + typeName: EmployeeComparisonExp --- kind: Model @@ -188,7 +183,7 @@ definition: source: dataConnectorName: chinook collection: Employee - filterExpressionType: EmployeeBoolExp + filterExpressionType: EmployeeComparisonExp orderableFields: - fieldName: id orderByDirections: diff --git a/fixtures/hasura/chinook/metadata/models/Genre.hml b/fixtures/hasura/chinook/metadata/models/Genre.hml index bdc3cbee..02f85577 100644 --- a/fixtures/hasura/chinook/metadata/models/Genre.hml +++ b/fixtures/hasura/chinook/metadata/models/Genre.hml @@ -5,7 +5,7 @@ definition: name: Genre fields: - name: id - type: Chinook_ObjectId! + type: ObjectId! - name: genreId type: Int! - name: name @@ -42,25 +42,29 @@ definition: - name --- -kind: ObjectBooleanExpressionType +kind: BooleanExpressionType version: v1 definition: - name: GenreBoolExp - objectType: Genre - dataConnectorName: chinook - dataConnectorObjectType: Genre - comparableFields: - - fieldName: id - operators: - enableAll: true - - fieldName: genreId - operators: - enableAll: true - - fieldName: name - operators: - enableAll: true + name: GenreComparisonExp + operand: + object: + type: Genre + comparableFields: + - fieldName: id + booleanExpressionType: ObjectIdComparisonExp + - fieldName: genreId + booleanExpressionType: IntComparisonExp + - fieldName: name + booleanExpressionType: StringComparisonExp + comparableRelationships: + - relationshipName: tracks + booleanExpressionType: TrackComparisonExp + logicalOperators: + enable: true + isNull: + enable: true graphql: - typeName: GenreBoolExp + typeName: GenreComparisonExp --- kind: Model @@ -71,7 +75,7 @@ definition: source: dataConnectorName: chinook collection: Genre - filterExpressionType: GenreBoolExp + filterExpressionType: GenreComparisonExp orderableFields: - fieldName: id orderByDirections: diff --git a/fixtures/hasura/chinook/metadata/models/Invoice.hml b/fixtures/hasura/chinook/metadata/models/Invoice.hml index 59f0f67f..654de3b8 100644 --- a/fixtures/hasura/chinook/metadata/models/Invoice.hml +++ b/fixtures/hasura/chinook/metadata/models/Invoice.hml @@ -5,7 +5,7 @@ definition: name: Invoice fields: - name: id - type: Chinook_ObjectId! + type: ObjectId! - name: billingAddress type: String - name: billingCity @@ -23,7 +23,7 @@ definition: - name: invoiceId type: Int! - name: total - type: Chinook_Decimal! + type: Decimal! graphql: typeName: Invoice inputTypeName: InvoiceInput @@ -84,46 +84,45 @@ definition: - total --- -kind: ObjectBooleanExpressionType +kind: BooleanExpressionType version: v1 definition: - name: InvoiceBoolExp - objectType: Invoice - dataConnectorName: chinook - dataConnectorObjectType: Invoice - comparableFields: - - fieldName: id - operators: - enableAll: true - - fieldName: billingAddress - operators: - enableAll: true - - fieldName: billingCity - operators: - enableAll: true - - fieldName: billingCountry - operators: - enableAll: true - - fieldName: billingPostalCode - operators: - enableAll: true - - fieldName: billingState - operators: - enableAll: true - - fieldName: customerId - operators: - enableAll: true - - fieldName: invoiceDate - operators: - enableAll: true - - fieldName: invoiceId - operators: - enableAll: true - - fieldName: total - operators: - enableAll: true + name: InvoiceComparisonExp + operand: + object: + type: Invoice + comparableFields: + - fieldName: id + booleanExpressionType: ObjectIdComparisonExp + - fieldName: billingAddress + booleanExpressionType: StringComparisonExp + - fieldName: billingCity + booleanExpressionType: StringComparisonExp + - fieldName: billingCountry + booleanExpressionType: StringComparisonExp + - fieldName: billingPostalCode + booleanExpressionType: StringComparisonExp + - fieldName: billingState + booleanExpressionType: StringComparisonExp + - fieldName: customerId + booleanExpressionType: IntComparisonExp + - fieldName: invoiceDate + booleanExpressionType: StringComparisonExp + - fieldName: invoiceId + booleanExpressionType: IntComparisonExp + - fieldName: total + booleanExpressionType: DecimalComparisonExp + comparableRelationships: + - relationshipName: customer + booleanExpressionType: CustomerComparisonExp + - relationshipName: lines + booleanExpressionType: InvoiceLineComparisonExp + logicalOperators: + enable: true + isNull: + enable: true graphql: - typeName: InvoiceBoolExp + typeName: InvoiceComparisonExp --- kind: Model @@ -134,7 +133,7 @@ definition: source: dataConnectorName: chinook collection: Invoice - filterExpressionType: InvoiceBoolExp + filterExpressionType: InvoiceComparisonExp orderableFields: - fieldName: id orderByDirections: diff --git a/fixtures/hasura/chinook/metadata/models/InvoiceLine.hml b/fixtures/hasura/chinook/metadata/models/InvoiceLine.hml index 8f6d8792..fcf35656 100644 --- a/fixtures/hasura/chinook/metadata/models/InvoiceLine.hml +++ b/fixtures/hasura/chinook/metadata/models/InvoiceLine.hml @@ -5,7 +5,7 @@ definition: name: InvoiceLine fields: - name: id - type: Chinook_ObjectId! + type: ObjectId! - name: invoiceId type: Int! - name: invoiceLineId @@ -15,7 +15,7 @@ definition: - name: trackId type: Int! - name: unitPrice - type: Chinook_Decimal! + type: Decimal! graphql: typeName: InvoiceLine inputTypeName: InvoiceLineInput @@ -60,34 +60,37 @@ definition: - unitPrice --- -kind: ObjectBooleanExpressionType +kind: BooleanExpressionType version: v1 definition: - name: InvoiceLineBoolExp - objectType: InvoiceLine - dataConnectorName: chinook - dataConnectorObjectType: InvoiceLine - comparableFields: - - fieldName: id - operators: - enableAll: true - - fieldName: invoiceId - operators: - enableAll: true - - fieldName: invoiceLineId - operators: - enableAll: true - - fieldName: quantity - operators: - enableAll: true - - fieldName: trackId - operators: - enableAll: true - - fieldName: unitPrice - operators: - enableAll: true + name: InvoiceLineComparisonExp + operand: + object: + type: InvoiceLine + comparableFields: + - fieldName: id + booleanExpressionType: ObjectIdComparisonExp + - fieldName: invoiceId + booleanExpressionType: IntComparisonExp + - fieldName: invoiceLineId + booleanExpressionType: IntComparisonExp + - fieldName: quantity + booleanExpressionType: IntComparisonExp + - fieldName: trackId + booleanExpressionType: IntComparisonExp + - fieldName: unitPrice + booleanExpressionType: DecimalComparisonExp + comparableRelationships: + - relationshipName: invoice + booleanExpressionType: InvoiceComparisonExp + - relationshipName: track + booleanExpressionType: TrackComparisonExp + logicalOperators: + enable: true + isNull: + enable: true graphql: - typeName: InvoiceLineBoolExp + typeName: InvoiceLineComparisonExp --- kind: Model @@ -98,7 +101,7 @@ definition: source: dataConnectorName: chinook collection: InvoiceLine - filterExpressionType: InvoiceLineBoolExp + filterExpressionType: InvoiceLineComparisonExp orderableFields: - fieldName: id orderByDirections: diff --git a/fixtures/hasura/chinook/metadata/models/MediaType.hml b/fixtures/hasura/chinook/metadata/models/MediaType.hml index 65c462f7..31d1153f 100644 --- a/fixtures/hasura/chinook/metadata/models/MediaType.hml +++ b/fixtures/hasura/chinook/metadata/models/MediaType.hml @@ -5,7 +5,7 @@ definition: name: MediaType fields: - name: id - type: Chinook_ObjectId! + type: ObjectId! - name: mediaTypeId type: Int! - name: name @@ -42,25 +42,29 @@ definition: - name --- -kind: ObjectBooleanExpressionType +kind: BooleanExpressionType version: v1 definition: - name: MediaTypeBoolExp - objectType: MediaType - dataConnectorName: chinook - dataConnectorObjectType: MediaType - comparableFields: - - fieldName: id - operators: - enableAll: true - - fieldName: mediaTypeId - operators: - enableAll: true - - fieldName: name - operators: - enableAll: true + name: MediaTypeComparisonExp + operand: + object: + type: MediaType + comparableFields: + - fieldName: id + booleanExpressionType: ObjectIdComparisonExp + - fieldName: mediaTypeId + booleanExpressionType: IntComparisonExp + - fieldName: name + booleanExpressionType: StringComparisonExp + comparableRelationships: + - relationshipName: tracks + booleanExpressionType: TrackComparisonExp + logicalOperators: + enable: true + isNull: + enable: true graphql: - typeName: MediaTypeBoolExp + typeName: MediaTypeComparisonExp --- kind: Model @@ -71,7 +75,7 @@ definition: source: dataConnectorName: chinook collection: MediaType - filterExpressionType: MediaTypeBoolExp + filterExpressionType: MediaTypeComparisonExp orderableFields: - fieldName: id orderByDirections: diff --git a/fixtures/hasura/chinook/metadata/models/Playlist.hml b/fixtures/hasura/chinook/metadata/models/Playlist.hml index 6e474e8e..b385a502 100644 --- a/fixtures/hasura/chinook/metadata/models/Playlist.hml +++ b/fixtures/hasura/chinook/metadata/models/Playlist.hml @@ -5,7 +5,7 @@ definition: name: Playlist fields: - name: id - type: Chinook_ObjectId! + type: ObjectId! - name: name type: String - name: playlistId @@ -42,25 +42,29 @@ definition: - playlistId --- -kind: ObjectBooleanExpressionType +kind: BooleanExpressionType version: v1 definition: - name: PlaylistBoolExp - objectType: Playlist - dataConnectorName: chinook - dataConnectorObjectType: Playlist - comparableFields: - - fieldName: id - operators: - enableAll: true - - fieldName: name - operators: - enableAll: true - - fieldName: playlistId - operators: - enableAll: true + name: PlaylistComparisonExp + operand: + object: + type: Playlist + comparableFields: + - fieldName: id + booleanExpressionType: ObjectIdComparisonExp + - fieldName: name + booleanExpressionType: StringComparisonExp + - fieldName: playlistId + booleanExpressionType: IntComparisonExp + comparableRelationships: + - relationshipName: playlistTracks + booleanExpressionType: TrackComparisonExp + logicalOperators: + enable: true + isNull: + enable: true graphql: - typeName: PlaylistBoolExp + typeName: PlaylistComparisonExp --- kind: Model @@ -71,7 +75,7 @@ definition: source: dataConnectorName: chinook collection: Playlist - filterExpressionType: PlaylistBoolExp + filterExpressionType: PlaylistComparisonExp orderableFields: - fieldName: id orderByDirections: diff --git a/fixtures/hasura/chinook/metadata/models/PlaylistTrack.hml b/fixtures/hasura/chinook/metadata/models/PlaylistTrack.hml index ec0efc74..6d4107c0 100644 --- a/fixtures/hasura/chinook/metadata/models/PlaylistTrack.hml +++ b/fixtures/hasura/chinook/metadata/models/PlaylistTrack.hml @@ -5,7 +5,7 @@ definition: name: PlaylistTrack fields: - name: id - type: Chinook_ObjectId! + type: ObjectId! - name: playlistId type: Int! - name: trackId @@ -42,25 +42,31 @@ definition: - trackId --- -kind: ObjectBooleanExpressionType +kind: BooleanExpressionType version: v1 definition: - name: PlaylistTrackBoolExp - objectType: PlaylistTrack - dataConnectorName: chinook - dataConnectorObjectType: PlaylistTrack - comparableFields: - - fieldName: id - operators: - enableAll: true - - fieldName: playlistId - operators: - enableAll: true - - fieldName: trackId - operators: - enableAll: true + name: PlaylistTrackComparisonExp + operand: + object: + type: PlaylistTrack + comparableFields: + - fieldName: id + booleanExpressionType: ObjectIdComparisonExp + - fieldName: playlistId + booleanExpressionType: IntComparisonExp + - fieldName: trackId + booleanExpressionType: IntComparisonExp + comparableRelationships: + - relationshipName: playlist + booleanExpressionType: PlaylistComparisonExp + - relationshipName: track + booleanExpressionType: TrackComparisonExp + logicalOperators: + enable: true + isNull: + enable: true graphql: - typeName: PlaylistTrackBoolExp + typeName: PlaylistTrackComparisonExp --- kind: Model @@ -71,7 +77,7 @@ definition: source: dataConnectorName: chinook collection: PlaylistTrack - filterExpressionType: PlaylistTrackBoolExp + filterExpressionType: PlaylistTrackComparisonExp orderableFields: - fieldName: id orderByDirections: diff --git a/fixtures/hasura/chinook/metadata/models/Track.hml b/fixtures/hasura/chinook/metadata/models/Track.hml index 9ac5889e..c681ce5c 100644 --- a/fixtures/hasura/chinook/metadata/models/Track.hml +++ b/fixtures/hasura/chinook/metadata/models/Track.hml @@ -5,7 +5,7 @@ definition: name: Track fields: - name: id - type: Chinook_ObjectId! + type: ObjectId! - name: albumId type: Int - name: bytes @@ -23,7 +23,7 @@ definition: - name: trackId type: Int! - name: unitPrice - type: Chinook_Decimal! + type: Decimal! graphql: typeName: Track inputTypeName: TrackInput @@ -84,46 +84,51 @@ definition: - unitPrice --- -kind: ObjectBooleanExpressionType +kind: BooleanExpressionType version: v1 definition: - name: TrackBoolExp - objectType: Track - dataConnectorName: chinook - dataConnectorObjectType: Track - comparableFields: - - fieldName: id - operators: - enableAll: true - - fieldName: albumId - operators: - enableAll: true - - fieldName: bytes - operators: - enableAll: true - - fieldName: composer - operators: - enableAll: true - - fieldName: genreId - operators: - enableAll: true - - fieldName: mediaTypeId - operators: - enableAll: true - - fieldName: milliseconds - operators: - enableAll: true - - fieldName: name - operators: - enableAll: true - - fieldName: trackId - operators: - enableAll: true - - fieldName: unitPrice - operators: - enableAll: true + name: TrackComparisonExp + operand: + object: + type: Track + comparableFields: + - fieldName: id + booleanExpressionType: ObjectIdComparisonExp + - fieldName: albumId + booleanExpressionType: IntComparisonExp + - fieldName: bytes + booleanExpressionType: IntComparisonExp + - fieldName: composer + booleanExpressionType: StringComparisonExp + - fieldName: genreId + booleanExpressionType: IntComparisonExp + - fieldName: mediaTypeId + booleanExpressionType: IntComparisonExp + - fieldName: milliseconds + booleanExpressionType: IntComparisonExp + - fieldName: name + booleanExpressionType: StringComparisonExp + - fieldName: trackId + booleanExpressionType: IntComparisonExp + - fieldName: unitPrice + booleanExpressionType: DecimalComparisonExp + comparableRelationships: + - relationshipName: album + booleanExpressionType: AlbumComparisonExp + - relationshipName: genre + booleanExpressionType: GenreComparisonExp + - relationshipName: invoiceLines + booleanExpressionType: InvoiceLineComparisonExp + - relationshipName: mediaType + booleanExpressionType: MediaTypeComparisonExp + - relationshipName: playlistTracks + booleanExpressionType: PlaylistTrackComparisonExp + logicalOperators: + enable: true + isNull: + enable: true graphql: - typeName: TrackBoolExp + typeName: TrackComparisonExp --- kind: Model @@ -134,7 +139,7 @@ definition: source: dataConnectorName: chinook collection: Track - filterExpressionType: TrackBoolExp + filterExpressionType: TrackComparisonExp orderableFields: - fieldName: id orderByDirections: diff --git a/fixtures/hasura/common/metadata/scalar-types/Date.hml b/fixtures/hasura/common/metadata/scalar-types/Date.hml new file mode 100644 index 00000000..56e6f057 --- /dev/null +++ b/fixtures/hasura/common/metadata/scalar-types/Date.hml @@ -0,0 +1,71 @@ +--- +kind: ScalarType +version: v1 +definition: + name: Date + graphql: + typeName: Date + +--- +kind: DataConnectorScalarRepresentation +version: v1 +definition: + dataConnectorName: chinook + dataConnectorScalarType: Date + representation: Date + +--- +kind: DataConnectorScalarRepresentation +version: v1 +definition: + dataConnectorName: sample_mflix + dataConnectorScalarType: Date + representation: Date + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: DateComparisonExp + operand: + scalar: + type: Date + comparisonOperators: + - name: _eq + argumentType: Date + - name: _neq + argumentType: Date + - name: _gt + argumentType: Date + - name: _gte + argumentType: Date + - name: _lt + argumentType: Date + - name: _lte + argumentType: Date + dataConnectorOperatorMapping: + - dataConnectorName: chinook + dataConnectorScalarType: Date + operatorMapping: + _eq: _eq + _neq: _neq + _gt: _gt + _gte: _gte + _lt: _lt + _lte: _lte + - dataConnectorName: sample_mflix + dataConnectorScalarType: Date + operatorMapping: + _eq: _eq + _neq: _neq + _gt: _gt + _gte: _gte + _lt: _lt + _lte: _lte + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: DateComparisonExp + diff --git a/fixtures/hasura/common/metadata/scalar-types/Decimal.hml b/fixtures/hasura/common/metadata/scalar-types/Decimal.hml new file mode 100644 index 00000000..f8a034a3 --- /dev/null +++ b/fixtures/hasura/common/metadata/scalar-types/Decimal.hml @@ -0,0 +1,70 @@ +--- +kind: ScalarType +version: v1 +definition: + name: Decimal + graphql: + typeName: Decimal + +--- +kind: DataConnectorScalarRepresentation +version: v1 +definition: + dataConnectorName: chinook + dataConnectorScalarType: Decimal + representation: Decimal + +--- +kind: DataConnectorScalarRepresentation +version: v1 +definition: + dataConnectorName: sample_mflix + dataConnectorScalarType: Decimal + representation: Decimal + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: DecimalComparisonExp + operand: + scalar: + type: Decimal + comparisonOperators: + - name: _eq + argumentType: Decimal + - name: _neq + argumentType: Decimal + - name: _gt + argumentType: Decimal + - name: _gte + argumentType: Decimal + - name: _lt + argumentType: Decimal + - name: _lte + argumentType: Decimal + dataConnectorOperatorMapping: + - dataConnectorName: chinook + dataConnectorScalarType: Decimal + operatorMapping: + _eq: _eq + _neq: _neq + _gt: _gt + _gte: _gte + _lt: _lt + _lte: _lte + - dataConnectorName: sample_mflix + dataConnectorScalarType: Decimal + operatorMapping: + _eq: _eq + _neq: _neq + _gt: _gt + _gte: _gte + _lt: _lt + _lte: _lte + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: DecimalComparisonExp diff --git a/fixtures/hasura/common/metadata/scalar-types/Double.hml b/fixtures/hasura/common/metadata/scalar-types/Double.hml new file mode 100644 index 00000000..ea7e305a --- /dev/null +++ b/fixtures/hasura/common/metadata/scalar-types/Double.hml @@ -0,0 +1,62 @@ +--- +kind: DataConnectorScalarRepresentation +version: v1 +definition: + dataConnectorName: chinook + dataConnectorScalarType: Double + representation: Float + +--- +kind: DataConnectorScalarRepresentation +version: v1 +definition: + dataConnectorName: sample_mflix + dataConnectorScalarType: Double + representation: Float + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: FloatComparisonExp + operand: + scalar: + type: Float + comparisonOperators: + - name: _eq + argumentType: Float + - name: _neq + argumentType: Float + - name: _gt + argumentType: Float + - name: _gte + argumentType: Float + - name: _lt + argumentType: Float + - name: _lte + argumentType: Float + dataConnectorOperatorMapping: + - dataConnectorName: chinook + dataConnectorScalarType: Double + operatorMapping: + _eq: _eq + _neq: _neq + _gt: _gt + _gte: _gte + _lt: _lt + _lte: _lte + - dataConnectorName: sample_mflix + dataConnectorScalarType: Double + operatorMapping: + _eq: _eq + _neq: _neq + _gt: _gt + _gte: _gte + _lt: _lt + _lte: _lte + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: DoubleComparisonExp diff --git a/fixtures/hasura/common/metadata/scalar-types/ExtendedJSON.hml b/fixtures/hasura/common/metadata/scalar-types/ExtendedJSON.hml new file mode 100644 index 00000000..37ced137 --- /dev/null +++ b/fixtures/hasura/common/metadata/scalar-types/ExtendedJSON.hml @@ -0,0 +1,23 @@ +--- +kind: ScalarType +version: v1 +definition: + name: ExtendedJSON + graphql: + typeName: ExtendedJSON + +--- +kind: DataConnectorScalarRepresentation +version: v1 +definition: + dataConnectorName: chinook + dataConnectorScalarType: ExtendedJSON + representation: ExtendedJSON + +--- +kind: DataConnectorScalarRepresentation +version: v1 +definition: + dataConnectorName: sample_mflix + dataConnectorScalarType: ExtendedJSON + representation: ExtendedJSON diff --git a/fixtures/hasura/common/metadata/scalar-types/Int.hml b/fixtures/hasura/common/metadata/scalar-types/Int.hml new file mode 100644 index 00000000..0afb1b1e --- /dev/null +++ b/fixtures/hasura/common/metadata/scalar-types/Int.hml @@ -0,0 +1,62 @@ +--- +kind: DataConnectorScalarRepresentation +version: v1 +definition: + dataConnectorName: chinook + dataConnectorScalarType: Int + representation: Int + +--- +kind: DataConnectorScalarRepresentation +version: v1 +definition: + dataConnectorName: sample_mflix + dataConnectorScalarType: Int + representation: Int + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: IntComparisonExp + operand: + scalar: + type: Int + comparisonOperators: + - name: _eq + argumentType: Int + - name: _neq + argumentType: Int + - name: _gt + argumentType: Int + - name: _gte + argumentType: Int + - name: _lt + argumentType: Int + - name: _lte + argumentType: Int + dataConnectorOperatorMapping: + - dataConnectorName: chinook + dataConnectorScalarType: Int + operatorMapping: + _eq: _eq + _neq: _neq + _gt: _gt + _gte: _gte + _lt: _lt + _lte: _lte + - dataConnectorName: sample_mflix + dataConnectorScalarType: Int + operatorMapping: + _eq: _eq + _neq: _neq + _gt: _gt + _gte: _gte + _lt: _lt + _lte: _lte + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: IntComparisonExp diff --git a/fixtures/hasura/common/metadata/scalar-types/ObjectId.hml b/fixtures/hasura/common/metadata/scalar-types/ObjectId.hml new file mode 100644 index 00000000..d89d0ca8 --- /dev/null +++ b/fixtures/hasura/common/metadata/scalar-types/ObjectId.hml @@ -0,0 +1,54 @@ +--- +kind: ScalarType +version: v1 +definition: + name: ObjectId + graphql: + typeName: ObjectId + +--- +kind: DataConnectorScalarRepresentation +version: v1 +definition: + dataConnectorName: chinook + dataConnectorScalarType: ObjectId + representation: ObjectId + +--- +kind: DataConnectorScalarRepresentation +version: v1 +definition: + dataConnectorName: sample_mflix + dataConnectorScalarType: ObjectId + representation: ObjectId + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: ObjectIdComparisonExp + operand: + scalar: + type: ObjectId + comparisonOperators: + - name: _eq + argumentType: ObjectId + - name: _neq + argumentType: ObjectId + dataConnectorOperatorMapping: + - dataConnectorName: chinook + dataConnectorScalarType: ObjectId + operatorMapping: + _eq: _eq + _neq: _neq + - dataConnectorName: sample_mflix + dataConnectorScalarType: ObjectId + operatorMapping: + _eq: _eq + _neq: _neq + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: ObjectIdComparisonExp diff --git a/fixtures/hasura/common/metadata/scalar-types/String.hml b/fixtures/hasura/common/metadata/scalar-types/String.hml new file mode 100644 index 00000000..fb03feb4 --- /dev/null +++ b/fixtures/hasura/common/metadata/scalar-types/String.hml @@ -0,0 +1,70 @@ +--- +kind: DataConnectorScalarRepresentation +version: v1 +definition: + dataConnectorName: chinook + dataConnectorScalarType: String + representation: String + +--- +kind: DataConnectorScalarRepresentation +version: v1 +definition: + dataConnectorName: sample_mflix + dataConnectorScalarType: String + representation: String + +--- +kind: BooleanExpressionType +version: v1 +definition: + name: StringComparisonExp + operand: + scalar: + type: String + comparisonOperators: + - name: _eq + argumentType: String + - name: _neq + argumentType: String + - name: _gt + argumentType: String + - name: _gte + argumentType: String + - name: _lt + argumentType: String + - name: _lte + argumentType: String + - name: _regex + argumentType: String + - name: _iregex + argumentType: String + dataConnectorOperatorMapping: + - dataConnectorName: chinook + dataConnectorScalarType: String + operatorMapping: + _eq: _eq + _neq: _neq + _gt: _gt + _gte: _gte + _lt: _lt + _lte: _lte + _regex: _regex + _iregex: _iregex + - dataConnectorName: sample_mflix + dataConnectorScalarType: String + operatorMapping: + _eq: _eq + _neq: _neq + _gt: _gt + _gte: _gte + _lt: _lt + _lte: _lte + _regex: _regex + _iregex: _iregex + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: StringComparisonExp diff --git a/fixtures/hasura/sample_mflix/metadata/models/Comments.hml b/fixtures/hasura/sample_mflix/metadata/models/Comments.hml index 5e0cba4f..9014c47c 100644 --- a/fixtures/hasura/sample_mflix/metadata/models/Comments.hml +++ b/fixtures/hasura/sample_mflix/metadata/models/Comments.hml @@ -68,34 +68,37 @@ definition: - text --- -kind: ObjectBooleanExpressionType +kind: BooleanExpressionType version: v1 definition: - name: CommentsBoolExp - objectType: Comments - dataConnectorName: sample_mflix - dataConnectorObjectType: comments - comparableFields: - - fieldName: id - operators: - enableAll: true - - fieldName: date - operators: - enableAll: true - - fieldName: email - operators: - enableAll: true - - fieldName: movieId - operators: - enableAll: true - - fieldName: name - operators: - enableAll: true - - fieldName: text - operators: - enableAll: true + name: CommentsComparisonExp + operand: + object: + type: Comments + comparableFields: + - fieldName: id + booleanExpressionType: ObjectIdComparisonExp + - fieldName: date + booleanExpressionType: DateComparisonExp + - fieldName: email + booleanExpressionType: StringComparisonExp + - fieldName: movieId + booleanExpressionType: ObjectIdComparisonExp + - fieldName: name + booleanExpressionType: StringComparisonExp + - fieldName: text + booleanExpressionType: StringComparisonExp + comparableRelationships: + - relationshipName: movie + booleanExpressionType: MoviesComparisonExp + - relationshipName: user + booleanExpressionType: UsersComparisonExp + logicalOperators: + enable: true + isNull: + enable: true graphql: - typeName: CommentsBoolExp + typeName: CommentsComparisonExp --- kind: Model @@ -106,7 +109,7 @@ definition: source: dataConnectorName: sample_mflix collection: comments - filterExpressionType: CommentsBoolExp + filterExpressionType: CommentsComparisonExp orderableFields: - fieldName: id orderByDirections: diff --git a/fixtures/hasura/sample_mflix/metadata/models/Movies.hml b/fixtures/hasura/sample_mflix/metadata/models/Movies.hml index 06fc64d2..bf25fadc 100644 --- a/fixtures/hasura/sample_mflix/metadata/models/Movies.hml +++ b/fixtures/hasura/sample_mflix/metadata/models/Movies.hml @@ -30,6 +30,29 @@ definition: - text - wins +--- +kind: BooleanExpressionType +version: v1 +definition: + name: MoviesAwardsComparisonExp + operand: + object: + type: MoviesAwards + comparableFields: + - fieldName: nominations + booleanExpressionType: IntComparisonExp + - fieldName: text + booleanExpressionType: StringComparisonExp + - fieldName: wins + booleanExpressionType: IntComparisonExp + comparableRelationships: [] + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: MoviesAwardsComparisonExp + --- kind: ObjectType version: v1 @@ -39,7 +62,7 @@ definition: - name: id type: Int! - name: rating - type: Double! + type: Float! - name: votes type: Int! graphql: @@ -62,6 +85,29 @@ definition: - rating - votes +--- +kind: BooleanExpressionType +version: v1 +definition: + name: MoviesImdbComparisonExp + operand: + object: + type: MoviesImdb + comparableFields: + - fieldName: id + booleanExpressionType: IntComparisonExp + - fieldName: rating + booleanExpressionType: FloatComparisonExp + - fieldName: votes + booleanExpressionType: IntComparisonExp + comparableRelationships: [] + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: MoviesImdbComparisonExp + --- kind: ObjectType version: v1 @@ -73,7 +119,7 @@ definition: - name: numReviews type: Int! - name: rating - type: Double! + type: Float! graphql: typeName: MoviesTomatoesCritic inputTypeName: MoviesTomatoesCriticInput @@ -94,6 +140,29 @@ definition: - numReviews - rating +--- +kind: BooleanExpressionType +version: v1 +definition: + name: MoviesTomatoesCriticComparisonExp + operand: + object: + type: MoviesTomatoesCritic + comparableFields: + - fieldName: meter + booleanExpressionType: IntComparisonExp + - fieldName: numReviews + booleanExpressionType: IntComparisonExp + - fieldName: rating + booleanExpressionType: FloatComparisonExp + comparableRelationships: [] + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: MoviesTomatoesCriticComparisonExp + --- kind: ObjectType version: v1 @@ -105,7 +174,7 @@ definition: - name: numReviews type: Int! - name: rating - type: Double! + type: Float! graphql: typeName: MoviesTomatoesViewer inputTypeName: MoviesTomatoesViewerInput @@ -126,6 +195,29 @@ definition: - numReviews - rating +--- +kind: BooleanExpressionType +version: v1 +definition: + name: MoviesTomatoesViewerComparisonExp + operand: + object: + type: MoviesTomatoesViewer + comparableFields: + - fieldName: meter + booleanExpressionType: IntComparisonExp + - fieldName: numReviews + booleanExpressionType: IntComparisonExp + - fieldName: rating + booleanExpressionType: FloatComparisonExp + comparableRelationships: [] + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: MoviesTomatoesViewerComparisonExp + --- kind: ObjectType version: v1 @@ -179,6 +271,43 @@ definition: - viewer - website +--- +kind: BooleanExpressionType +version: v1 +definition: + name: MoviesTomatoesComparisonExp + operand: + object: + type: MoviesTomatoes + comparableFields: + - fieldName: boxOffice + booleanExpressionType: StringComparisonExp + - fieldName: consensus + booleanExpressionType: StringComparisonExp + - fieldName: critic + booleanExpressionType: MoviesTomatoesCriticComparisonExp + - fieldName: dvd + booleanExpressionType: DateComparisonExp + - fieldName: fresh + booleanExpressionType: IntComparisonExp + - fieldName: lastUpdated + booleanExpressionType: StringComparisonExp + - fieldName: production + booleanExpressionType: StringComparisonExp + - fieldName: rotten + booleanExpressionType: IntComparisonExp + - fieldName: viewer + booleanExpressionType: MoviesTomatoesViewerComparisonExp + - fieldName: website + booleanExpressionType: StringComparisonExp + comparableRelationships: [] + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: MoviesTomatoesComparisonExp + --- kind: ObjectType version: v1 @@ -336,82 +465,55 @@ definition: - year --- -kind: ObjectBooleanExpressionType +kind: BooleanExpressionType version: v1 definition: - name: MoviesBoolExp - objectType: Movies - dataConnectorName: sample_mflix - dataConnectorObjectType: movies - comparableFields: - - fieldName: id - operators: - enableAll: true - - fieldName: awards - operators: - enableAll: true - - fieldName: cast - operators: - enableAll: true - - fieldName: countries - operators: - enableAll: true - - fieldName: directors - operators: - enableAll: true - - fieldName: fullplot - operators: - enableAll: true - - fieldName: genres - operators: - enableAll: true - - fieldName: imdb - operators: - enableAll: true - - fieldName: languages - operators: - enableAll: true - - fieldName: lastupdated - operators: - enableAll: true - - fieldName: metacritic - operators: - enableAll: true - - fieldName: numMflixComments - operators: - enableAll: true - - fieldName: plot - operators: - enableAll: true - - fieldName: poster - operators: - enableAll: true - - fieldName: rated - operators: - enableAll: true - - fieldName: released - operators: - enableAll: true - - fieldName: runtime - operators: - enableAll: true - - fieldName: title - operators: - enableAll: true - - fieldName: tomatoes - operators: - enableAll: true - - fieldName: type - operators: - enableAll: true - - fieldName: writers - operators: - enableAll: true - - fieldName: year - operators: - enableAll: true + name: MoviesComparisonExp + operand: + object: + type: Movies + comparableFields: + - fieldName: id + booleanExpressionType: ObjectIdComparisonExp + - fieldName: awards + booleanExpressionType: MoviesAwardsComparisonExp + - fieldName: fullplot + booleanExpressionType: StringComparisonExp + - fieldName: imdb + booleanExpressionType: MoviesImdbComparisonExp + - fieldName: lastupdated + booleanExpressionType: DateComparisonExp + - fieldName: metacritic + booleanExpressionType: IntComparisonExp + - fieldName: numMflixComments + booleanExpressionType: IntComparisonExp + - fieldName: plot + booleanExpressionType: StringComparisonExp + - fieldName: poster + booleanExpressionType: StringComparisonExp + - fieldName: rated + booleanExpressionType: StringComparisonExp + - fieldName: released + booleanExpressionType: DateComparisonExp + - fieldName: runtime + booleanExpressionType: IntComparisonExp + - fieldName: title + booleanExpressionType: StringComparisonExp + - fieldName: tomatoes + booleanExpressionType: MoviesTomatoesComparisonExp + - fieldName: type + booleanExpressionType: StringComparisonExp + - fieldName: year + booleanExpressionType: IntComparisonExp + comparableRelationships: + - relationshipName: comments + booleanExpressionType: CommentsComparisonExp + logicalOperators: + enable: true + isNull: + enable: true graphql: - typeName: MoviesBoolExp + typeName: MoviesComparisonExp --- kind: Model @@ -422,7 +524,7 @@ definition: source: dataConnectorName: sample_mflix collection: movies - filterExpressionType: MoviesBoolExp + filterExpressionType: MoviesComparisonExp orderableFields: - fieldName: id orderByDirections: diff --git a/fixtures/hasura/sample_mflix/metadata/models/Sessions.hml b/fixtures/hasura/sample_mflix/metadata/models/Sessions.hml index 50f3969f..8f03b1b4 100644 --- a/fixtures/hasura/sample_mflix/metadata/models/Sessions.hml +++ b/fixtures/hasura/sample_mflix/metadata/models/Sessions.hml @@ -41,25 +41,27 @@ definition: - userId --- -kind: ObjectBooleanExpressionType +kind: BooleanExpressionType version: v1 definition: - name: SessionsBoolExp - objectType: Sessions - dataConnectorName: sample_mflix - dataConnectorObjectType: sessions - comparableFields: - - fieldName: id - operators: - enableAll: true - - fieldName: jwt - operators: - enableAll: true - - fieldName: userId - operators: - enableAll: true + name: SessionsComparisonExp + operand: + object: + type: Sessions + comparableFields: + - fieldName: id + booleanExpressionType: ObjectIdComparisonExp + - fieldName: jwt + booleanExpressionType: StringComparisonExp + - fieldName: userId + booleanExpressionType: StringComparisonExp + comparableRelationships: [] + logicalOperators: + enable: true + isNull: + enable: true graphql: - typeName: SessionsBoolExp + typeName: SessionsComparisonExp --- kind: Model @@ -70,7 +72,7 @@ definition: source: dataConnectorName: sample_mflix collection: sessions - filterExpressionType: SessionsBoolExp + filterExpressionType: SessionsComparisonExp orderableFields: - fieldName: id orderByDirections: diff --git a/fixtures/hasura/sample_mflix/metadata/models/Theaters.hml b/fixtures/hasura/sample_mflix/metadata/models/Theaters.hml index 7620bb60..2fb849f3 100644 --- a/fixtures/hasura/sample_mflix/metadata/models/Theaters.hml +++ b/fixtures/hasura/sample_mflix/metadata/models/Theaters.hml @@ -21,6 +21,33 @@ definition: - dataConnectorName: sample_mflix dataConnectorObjectType: theaters_location_address +--- +kind: BooleanExpressionType +version: v1 +definition: + name: TheatersLocationAddressComparisonExp + operand: + object: + type: TheatersLocationAddress + comparableFields: + - fieldName: city + booleanExpressionType: StringComparisonExp + - fieldName: state + booleanExpressionType: StringComparisonExp + - fieldName: street1 + booleanExpressionType: StringComparisonExp + - fieldName: street2 + booleanExpressionType: StringComparisonExp + - fieldName: zipcode + booleanExpressionType: StringComparisonExp + comparableRelationships: [] + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: TheatersLocationAddressComparisonExp + --- kind: TypePermissions version: v1 @@ -43,7 +70,7 @@ definition: name: TheatersLocationGeo fields: - name: coordinates - type: "[Double!]!" + type: "[Float!]!" - name: type type: String! graphql: @@ -65,6 +92,25 @@ definition: - coordinates - type +--- +kind: BooleanExpressionType +version: v1 +definition: + name: TheatersLocationGeoComparisonExp + operand: + object: + type: TheatersLocationGeo + comparableFields: + - fieldName: type + booleanExpressionType: StringComparisonExp + comparableRelationships: [] + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: TheatersLocationGeoComparisonExp + --- kind: ObjectType version: v1 @@ -94,6 +140,27 @@ definition: - address - geo +--- +kind: BooleanExpressionType +version: v1 +definition: + name: TheatersLocationComparisonExp + operand: + object: + type: TheatersLocation + comparableFields: + - fieldName: address + booleanExpressionType: TheatersLocationAddressComparisonExp + - fieldName: geo + booleanExpressionType: TheatersLocationGeoComparisonExp + comparableRelationships: [] + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: TheatersLocationComparisonExp + --- kind: ObjectType version: v1 @@ -123,6 +190,29 @@ definition: column: name: theaterId +--- +kind: BooleanExpressionType +version: v1 +definition: + name: TheatersComparisonExp + operand: + object: + type: Theaters + comparableFields: + - fieldName: id + booleanExpressionType: ObjectIdComparisonExp + - fieldName: location + booleanExpressionType: TheatersLocationComparisonExp + - fieldName: theaterId + booleanExpressionType: IntComparisonExp + comparableRelationships: [] + logicalOperators: + enable: true + isNull: + enable: true + graphql: + typeName: TheatersComparisonExp + --- kind: TypePermissions version: v1 @@ -137,25 +227,27 @@ definition: - theaterId --- -kind: ObjectBooleanExpressionType +kind: BooleanExpressionType version: v1 definition: - name: TheatersBoolExp - objectType: Theaters - dataConnectorName: sample_mflix - dataConnectorObjectType: theaters - comparableFields: - - fieldName: id - operators: - enableAll: true - - fieldName: location - operators: - enableAll: true - - fieldName: theaterId - operators: - enableAll: true + name: TheatersComparisonExp + operand: + object: + type: Theaters + comparableFields: + - fieldName: id + booleanExpressionType: ObjectIdComparisonExp + - fieldName: location + booleanExpressionType: TheatersLocationComparisonExp + - fieldName: theaterId + booleanExpressionType: IntComparisonExp + comparableRelationships: [] + logicalOperators: + enable: true + isNull: + enable: true graphql: - typeName: TheatersBoolExp + typeName: TheatersComparisonExp --- kind: Model @@ -166,7 +258,7 @@ definition: source: dataConnectorName: sample_mflix collection: theaters - filterExpressionType: TheatersBoolExp + filterExpressionType: TheatersComparisonExp orderableFields: - fieldName: id orderByDirections: diff --git a/fixtures/hasura/sample_mflix/metadata/models/TitleWordFrequency.hml b/fixtures/hasura/sample_mflix/metadata/models/TitleWordFrequency.hml index 19d781e2..294e8448 100644 --- a/fixtures/hasura/sample_mflix/metadata/models/TitleWordFrequency.hml +++ b/fixtures/hasura/sample_mflix/metadata/models/TitleWordFrequency.hml @@ -35,22 +35,25 @@ definition: - count --- -kind: ObjectBooleanExpressionType +kind: BooleanExpressionType version: v1 definition: - name: TitleWordFrequencyBoolExp - objectType: TitleWordFrequency - dataConnectorName: sample_mflix - dataConnectorObjectType: TitleWordFrequency - comparableFields: - - fieldName: word - operators: - enableAll: true - - fieldName: count - operators: - enableAll: true + name: TitleWordFrequencyComparisonExp + operand: + object: + type: TitleWordFrequency + comparableFields: + - fieldName: word + booleanExpressionType: StringComparisonExp + - fieldName: count + booleanExpressionType: IntComparisonExp + comparableRelationships: [] + logicalOperators: + enable: true + isNull: + enable: true graphql: - typeName: TitleWordFrequencyBoolExp + typeName: TitleWordFrequencyComparisonExp --- kind: Model @@ -61,7 +64,7 @@ definition: source: dataConnectorName: sample_mflix collection: title_word_frequency - filterExpressionType: TitleWordFrequencyBoolExp + filterExpressionType: TitleWordFrequencyComparisonExp orderableFields: - fieldName: word orderByDirections: diff --git a/fixtures/hasura/sample_mflix/metadata/models/Users.hml b/fixtures/hasura/sample_mflix/metadata/models/Users.hml index ae9324b7..322daedb 100644 --- a/fixtures/hasura/sample_mflix/metadata/models/Users.hml +++ b/fixtures/hasura/sample_mflix/metadata/models/Users.hml @@ -59,31 +59,31 @@ definition: - name --- -kind: ObjectBooleanExpressionType +kind: BooleanExpressionType version: v1 definition: - name: UsersBoolExp - objectType: Users - dataConnectorName: sample_mflix - dataConnectorObjectType: users - comparableFields: - - fieldName: id - operators: - enableAll: true - - fieldName: email - operators: - enableAll: true - - fieldName: name - operators: - enableAll: true - - fieldName: password - operators: - enableAll: true - - fieldName: preferences - operators: - enableAll: true + name: UsersComparisonExp + operand: + object: + type: Users + comparableFields: + - fieldName: id + booleanExpressionType: ObjectIdComparisonExp + - fieldName: email + booleanExpressionType: StringComparisonExp + - fieldName: name + booleanExpressionType: StringComparisonExp + - fieldName: password + booleanExpressionType: StringComparisonExp + comparableRelationships: + - relationshipName: comments + booleanExpressionType: CommentsComparisonExp + logicalOperators: + enable: true + isNull: + enable: true graphql: - typeName: UsersBoolExp + typeName: UsersComparisonExp --- kind: Model @@ -94,7 +94,7 @@ definition: source: dataConnectorName: sample_mflix collection: users - filterExpressionType: UsersBoolExp + filterExpressionType: UsersComparisonExp orderableFields: - fieldName: id orderByDirections: diff --git a/fixtures/hasura/sample_mflix/metadata/sample_mflix-types.hml b/fixtures/hasura/sample_mflix/metadata/sample_mflix-types.hml deleted file mode 100644 index 423f0a71..00000000 --- a/fixtures/hasura/sample_mflix/metadata/sample_mflix-types.hml +++ /dev/null @@ -1,93 +0,0 @@ ---- -kind: ScalarType -version: v1 -definition: - name: ObjectId - graphql: - typeName: ObjectId - ---- -kind: DataConnectorScalarRepresentation -version: v1 -definition: - dataConnectorName: sample_mflix - dataConnectorScalarType: ObjectId - representation: ObjectId - graphql: - comparisonExpressionTypeName: ObjectIdComparisonExp - ---- -kind: ScalarType -version: v1 -definition: - name: Date - graphql: - typeName: Date - ---- -kind: DataConnectorScalarRepresentation -version: v1 -definition: - dataConnectorName: sample_mflix - dataConnectorScalarType: Date - representation: Date - graphql: - comparisonExpressionTypeName: DateComparisonExp - ---- -kind: DataConnectorScalarRepresentation -version: v1 -definition: - dataConnectorName: sample_mflix - dataConnectorScalarType: String - representation: String - graphql: - comparisonExpressionTypeName: StringComparisonExp - ---- -kind: ScalarType -version: v1 -definition: - name: ExtendedJson - graphql: - typeName: ExtendedJson - ---- -kind: DataConnectorScalarRepresentation -version: v1 -definition: - dataConnectorName: sample_mflix - dataConnectorScalarType: Int - representation: Int - graphql: - comparisonExpressionTypeName: IntComparisonExp - ---- -kind: DataConnectorScalarRepresentation -version: v1 -definition: - dataConnectorName: sample_mflix - dataConnectorScalarType: ExtendedJSON - representation: ExtendedJson - graphql: - comparisonExpressionTypeName: ExtendedJsonComparisonExp - ---- -kind: ScalarType -version: v1 -definition: - name: Double - graphql: - typeName: Double - ---- -kind: DataConnectorScalarRepresentation -version: v1 -definition: - dataConnectorName: sample_mflix - dataConnectorScalarType: Double - representation: Double - graphql: - comparisonExpressionTypeName: DoubleComparisonExp - -