-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update integration fixtures to work with latest cli (#88)
I reorganized and updated the ddn and connector configuration fixtures used in integration tests to match the structure used by the ddn cli. This lets us use commands like `ddn connector introspect` to update connector configuration, and `ddn connector-link update` to update subgraphs. The fixtures are tied to the arion services, so those commands will work after running services with `arion up -d`. I added `fixtures/hasura/README.md` with the exact commands to run for updates.
- Loading branch information
Showing
96 changed files
with
786 additions
and
266 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.hml linguist-language=yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"HasuraHQ.hasura" | ||
], | ||
"settings": { | ||
"terminal.integrated.shell.linux": "/bin/bash", | ||
"terminal.integrated.shellArgs.linux": [ | ||
"-l" | ||
] | ||
} | ||
} | ||
}, | ||
"name": "Hasura DDN Codespace", | ||
"postCreateCommand": "curl -L https://graphql-engine-cdn.hasura.io/ddn/cli/v2/get.sh | bash" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
context: | ||
supergraph: ../supergraph.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"recommendations": [ | ||
"HasuraHQ.hasura" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"configurations": [ | ||
{ | ||
"cwd": "${workspaceFolder}", | ||
"name": "DDN Dev", | ||
"preLaunchTask": "dev", | ||
"program": "${workspaceFolder}", | ||
"request": "launch", | ||
"type": "node" | ||
} | ||
], | ||
"version": "0.2.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"tasks": [ | ||
{ | ||
"args": [ | ||
"watch", | ||
"--dir", | ||
"." | ||
], | ||
"command": "ddn", | ||
"label": "watch", | ||
"options": { | ||
"cwd": "${workspaceFolder}" | ||
}, | ||
"presentation": { | ||
"clear": true, | ||
"close": false, | ||
"focus": true, | ||
"panel": "new", | ||
"reveal": "always" | ||
}, | ||
"problemMatcher": [], | ||
"type": "shell" | ||
} | ||
], | ||
"version": "2.0.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# MongoDB Connector Hasura fixtures | ||
|
||
This directory contains example DDN and connector configuration which is used to | ||
run integration tests in this repo, and supports local development. | ||
|
||
Instead of having docker compose configurations in this directory, supporting | ||
services are run using arion configurations defined at the top level of the | ||
repo. Before running ddn commands bring up services with: | ||
|
||
```sh | ||
arion up -d | ||
``` | ||
|
||
## Cheat Sheet | ||
|
||
We have two subgraphs, and two connector configurations. So a lot of these | ||
commands are repeated for each subgraph + connector combination. | ||
|
||
Run introspection to update connector configuration: | ||
|
||
```sh | ||
$ ddn connector introspect --connector sample_mflix/connector/sample_mflix/connector.yaml | ||
|
||
$ ddn connector introspect --connector chinook/connector/chinook/connector.yaml | ||
``` | ||
|
||
Update Hasura metadata based on connector configuration | ||
(after restarting connectors with `arion up -d` if there were changes from | ||
introspection): | ||
|
||
```sh | ||
$ ddn connector-link update sample_mflix --subgraph sample_mflix/subgraph.yaml --env-file sample_mflix/.env.sample_mflix --add-all-resources | ||
|
||
$ ddn connector-link update chinook --subgraph chinook/subgraph.yaml --env-file chinook/.env.chinook --add-all-resources | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
CHINOOK_CONNECTOR_URL='http://localhost:7131' |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
MONGODB_DATABASE_URI="mongodb://localhost/chinook" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"introspectionOptions": { | ||
"sampleSize": 100, | ||
"noValidatorSchema": false, | ||
"allSchemaNullable": false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
kind: Connector | ||
version: v1 | ||
definition: | ||
name: chinook | ||
subgraph: chinook | ||
source: hasura/mongodb:v0.1.0 | ||
context: . | ||
envFile: .env |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.