这是indexloc提供的服务,不要输入任何密码
Skip to content

switch sample_mflix fixture config to use new boolean expression metadata #93

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions arion-compose/services/engine.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
69 changes: 45 additions & 24 deletions fixtures/hasura/chinook/metadata/ArtistsWithAlbumsAndTracks.hml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -40,21 +40,42 @@ 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
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
Expand Down Expand Up @@ -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
Expand All @@ -112,7 +133,7 @@ definition:
source:
dataConnectorName: chinook
collection: artists_with_albums_and_tracks
filterExpressionType: ArtistWithAlbumsAndTracksBoolExp
filterExpressionType: ArtistWithAlbumsAndTracksComparisonExp
orderableFields:
- fieldName: id
orderByDirections:
Expand All @@ -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

---
Expand Down
92 changes: 0 additions & 92 deletions fixtures/hasura/chinook/metadata/chinook-types.hml

This file was deleted.

2 changes: 1 addition & 1 deletion fixtures/hasura/chinook/metadata/commands/InsertArtist.hml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ definition:
inputTypeName: InsertArtistInput
fields:
- name: ok
type: Chinook_Double!
type: Float!
- name: n
type: Int!
dataConnectorTypeMapping:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
47 changes: 26 additions & 21 deletions fixtures/hasura/chinook/metadata/models/Album.hml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ definition:
name: Album
fields:
- name: id
type: Chinook_ObjectId!
type: ObjectId!
- name: albumId
type: Int!
- name: artistId
Expand Down Expand Up @@ -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
Expand All @@ -80,7 +85,7 @@ definition:
source:
dataConnectorName: chinook
collection: Album
filterExpressionType: AlbumBoolExp
filterExpressionType: AlbumComparisonExp
orderableFields:
- fieldName: id
orderByDirections:
Expand Down
40 changes: 22 additions & 18 deletions fixtures/hasura/chinook/metadata/models/Artist.hml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ definition:
name: Artist
fields:
- name: id
type: Chinook_ObjectId!
type: ObjectId!
- name: artistId
type: Int!
- name: name
Expand Down Expand Up @@ -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
Expand All @@ -71,7 +75,7 @@ definition:
source:
dataConnectorName: chinook
collection: Artist
filterExpressionType: ArtistBoolExp
filterExpressionType: ArtistComparisonExp
orderableFields:
- fieldName: id
orderByDirections:
Expand Down
Loading
Loading