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

update local services and fixtures to use latest engine version #33

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 3 commits into from
Apr 12, 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
9 changes: 4 additions & 5 deletions arion-compose/service-dev-auth-webhook.nix
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
{ pkgs }:

let
dev-auth-webhook = pkgs.pkgsCross.linux.dev-auth-webhook;
in
{
service = {
useHostStore = true;
# Get node from a Docker image instead of from Nix because cross-compiling
# Node from Darwin to Linux doesn't work.
image = "node:lts-alpine";
command = [
"node"
"${pkgs.pkgsCross.linux.dev-auth-webhook}/index.js"
"${dev-auth-webhook}/bin/hasura-dev-auth-webhook"
];
};
}
4 changes: 2 additions & 2 deletions arion-compose/service-engine.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ let
done
cat "$combined" \
| yq -o=json \
| jq -s 'map(if .kind == "DataConnectorLink" then .definition.url = { singleUrl: { value: "${connector-url}" } } else . end)' \
| jq -s 'map(if .kind == "DataConnectorLink" then .definition.url = { singleUrl: { value: "${connector-url}" } } else . end) | map(select(type != "null"))' \
> metadata.json
'';

Expand All @@ -54,7 +54,7 @@ in
image.contents = with pkgs.pkgsCross.linux; [
cacert
curl
v3-engine # added to pkgs via an overlay in flake.nix.
graphql-engine # added to pkgs via an overlay in flake.nix.
];
service = withOverrides service {
useHostStore = true;
Expand Down
15 changes: 9 additions & 6 deletions fixtures/ddn/subgraphs/chinook/commands/InsertArtist.hml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,9 @@ definition:
dataConnectorName: mongodb
dataConnectorCommand:
procedure: insertArtist
typeMapping:
InsertArtist:
fieldMapping:
ok: { column: ok }
n: { column: n }
argumentMapping:
id: id
name: name
graphql:
rootFieldName: insertArtist
rootFieldKind: Mutation
Expand All @@ -43,6 +41,12 @@ definition:
type: Int!
- name: n
type: Int!
dataConnectorTypeMapping:
- dataConnectorName: mongodb
dataConnectorObjectType: InsertArtist
fieldMapping:
ok: { column: { name: ok } }
n: { column: { name: n } }

---
kind: TypePermissions
Expand All @@ -55,4 +59,3 @@ definition:
allowedFields:
- ok
- n

33 changes: 26 additions & 7 deletions fixtures/ddn/subgraphs/chinook/dataconnectors/mongodb-types.hml
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
---
kind: ScalarType
version: v1
definition:
name: ObjectId
graphql:
typeName: objectId
typeName: App_ObjectId

---
kind: DataConnectorScalarRepresentation
version: v1
definition:
dataConnectorName: mongodb
dataConnectorScalarType: ObjectId
representation: ObjectId
graphql:
comparisonExpressionTypeName: App_ObjectIdComparisonExp

---
kind: DataConnectorScalarRepresentation
Expand All @@ -13,7 +24,7 @@ definition:
dataConnectorScalarType: Int
representation: Int
graphql:
comparisonExpressionTypeName: MongodbIntComparisonExp
comparisonExpressionTypeName: App_IntComparisonExp

---
kind: DataConnectorScalarRepresentation
Expand All @@ -23,17 +34,25 @@ definition:
dataConnectorScalarType: String
representation: String
graphql:
comparisonExpressionTypeName: MongodbStringComparisonExp
comparisonExpressionTypeName: App_StringComparisonExp

---
kind: ScalarType
version: v1
definition:
name: ExtendedJson
graphql:
typeName: App_ExtendedJson

---
kind: DataConnectorScalarRepresentation
version: v1
definition:
dataConnectorName: mongodb
dataConnectorScalarType: ObjectId
representation: ObjectId
dataConnectorScalarType: ExtendedJSON
representation: ExtendedJson
graphql:
comparisonExpressionTypeName: objectIdComparisonExp
comparisonExpressionTypeName: App_ExtendedJsonComparisonExp

---
kind: DataConnectorScalarRepresentation
Expand All @@ -43,4 +62,4 @@ definition:
dataConnectorScalarType: Float
representation: Float
graphql:
comparisonExpressionTypeName: MongodbFloatComparisonExp
comparisonExpressionTypeName: App_FloatComparisonExp
Loading