Skip to content

Commit

Permalink
Full names
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilkisiela committed Sep 3, 2024
1 parent f067179 commit 488b817
Show file tree
Hide file tree
Showing 43 changed files with 35 additions and 31 deletions.
4 changes: 2 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

1. Create a new directory in the `gateways` folder with the name of the new gateway.
2. Prepare the `install.sh` script that will install the necessary dependencies, the gateway itself.
3. Create the `run.sh` script that will start the gateway. See an example using [supergraph.graphql](../gateways/grafbase/run.sh) and [subgraphs information](../gateways/cosmo/run.sh).
4. Add the `gateway.json` file with the necessary information about the gateway. See an example [here](../gateways/hive/gateway.json).
3. Create the `run.sh` script that will start the gateway. See an example using [supergraph.graphql](../gateways/grafbase-gateway/run.sh) and [subgraphs information](../gateways/cosmo-router/run.sh).
4. Add the `gateway.json` file with the necessary information about the gateway. See an example [here](../gateways/hive-gateway/gateway.json).
5. The `.gitignore` should be created as well to avoid committing unnecessary files.
6. Execute `make test-[name of the gateway]` to test your gateway.
7. Run `make summary` to include your gateway in the results.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
run: make install

- name: Test
run: npm start -- test --cwd ./gateways/hive --run-script ./run.sh --reporter tap --graphql http://127.0.0.1:4000/graphql --healthcheck http://127.0.0.1:4000/healthcheck --exit-on-fail
run: npm start -- test --cwd ./gateways/hive-gateway --run-script ./run.sh --reporter tap --graphql http://127.0.0.1:4000/graphql --healthcheck http://127.0.0.1:4000/healthcheck --exit-on-fail

gateways:
runs-on: ubuntu-latest
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ You can run the tests for a specific gateway by running the following command:
```bash
make test-[name of the gateway]

make test-grafbase
make test-cosmo
make test-hive
make test-router
make test-grafbase-gateway
make test-cosmo-router
make test-hive-gateway
make test-apollo-router
```

### Running a gateway for a single test suite
Expand Down
10 changes: 5 additions & 5 deletions REPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Take a closer look at the results for each gateway.

You can look at the full list of tests [here](./src/test-suites/). Every test id corresponds to a directory in the `src/test-suites` folder.

<a id="hive"></a>
<a id="hive-gateway"></a>

### Hive Gateway

Expand Down Expand Up @@ -108,7 +108,7 @@ You can look at the full list of tests [here](./src/test-suites/). Every test id
<pre>🟢🟢🟢🟢🟢🟢🟢🟢</pre>
</details>

<a id="router"></a>
<a id="apollo-router"></a>

### Apollo Router

Expand Down Expand Up @@ -290,7 +290,7 @@ You can look at the full list of tests [here](./src/test-suites/). Every test id
<pre>🟢🟢🟢🟢🟢🟢🟢🟢</pre>
</details>

<a id="router-native"></a>
<a id="apollo-router-native"></a>

### Apollo Router (native QP)

Expand Down Expand Up @@ -381,7 +381,7 @@ You can look at the full list of tests [here](./src/test-suites/). Every test id
<pre>🟢🟢🟢🟢🟢🟢🟢🟢</pre>
</details>

<a id="cosmo"></a>
<a id="cosmo-router"></a>

### Cosmo Router

Expand Down Expand Up @@ -472,7 +472,7 @@ You can look at the full list of tests [here](./src/test-suites/). Every test id
<pre>❌❌❌❌❌❌❌❌</pre>
</details>

<a id="grafbase"></a>
<a id="grafbase-gateway"></a>

### Grafbase Gateway

Expand Down
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions gateways/apollo-router-native/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
curl -sSL https://router.apollo.dev/download/nix/v2.0.0-alpha.3 | sh
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions gateways/apollo-router-native/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
npm start supergraph -- --cwd ./gateways/apollo-router-native --test $1
./router --supergraph supergraph.graphql --config router.yaml
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions gateways/apollo-router/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
curl -sSL https://router.apollo.dev/download/nix/v2.0.0-alpha.3 | sh
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions gateways/apollo-router/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
npm start supergraph -- --cwd ./gateways/apollo-router --test $1
./router --supergraph supergraph.graphql --config router.yaml
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion gateways/cosmo/run.sh → gateways/cosmo-router/run.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
npm start subgraphs -- --cwd ./gateways/cosmo --test $1
npm start subgraphs -- --cwd ./gateways/cosmo-router --test $1
npx tsx ./wgc.js
npx wgc router compose -i compose.yaml -o config.json
./cosmo
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.
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
npm start supergraph -- --cwd ./gateways/grafbase --test $1
npm start supergraph -- --cwd ./gateways/grafbase-gateway --test $1
__GRAFBASE_RUST_LOG=engine_v2=trace ./grafbase-gateway --schema supergraph.graphql --listen-address 127.0.0.1:4000 -c grafbase.toml --log trace
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion gateways/hive/run.sh → gateways/hive-gateway/run.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
npm start supergraph -- --cwd ./gateways/hive --test $1
npm start supergraph -- --cwd ./gateways/hive-gateway --test $1
npx --yes @graphql-hive/[email protected] supergraph supergraph.graphql --port 4000 --fork 1
1 change: 0 additions & 1 deletion gateways/router-native/install.sh

This file was deleted.

2 changes: 0 additions & 2 deletions gateways/router-native/run.sh

This file was deleted.

1 change: 0 additions & 1 deletion gateways/router/install.sh

This file was deleted.

2 changes: 0 additions & 2 deletions gateways/router/run.sh

This file was deleted.

4 changes: 4 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ run-$(1):
npm start -- start --test $(TEST_SUITE) --cwd ./gateways/$(1) --run-script ./run.sh --graphql $(shell jq -r .graphql ./gateways/$(1)/gateway.json) --healthcheck $(shell jq -r .health ./gateways/$(1)/gateway.json)
endef

# Install all dependencies of the project and the gateways
install:
npm install
@for dir in ./gateways/*; do \
Expand All @@ -29,6 +30,7 @@ install:
fi; \
done

# Start only the subgraphs, no gateway
subgraphs:
npm start -- serve

Expand All @@ -37,7 +39,9 @@ $(foreach gateway,$(GATEWAY_IDS),$(eval $(call TEST_GATEWAY,$(gateway))))
$(foreach gateway,$(GATEWAY_IDS),$(eval $(call RUN_GATEWAY,$(gateway))))
$(foreach gateway,$(GATEWAY_IDS),$(eval $(call TEST_SUITE_GATEWAY,$(gateway))))

# Run the tests for all gateways
test-all: $(addprefix test-,$(GATEWAY_IDS)) summary

# Update the report
summary:
npm run summary
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ yargs(hideBin(process.argv))
result: Array<"." | "X">;
}> = [];

process.stdout.write("Running " + ids.length + " tests\n");
process.stdout.write("Running " + ids.length + " test suites\n");

if (!existsSync(resolvePath(argv, "./logs"))) {
mkdirSync(resolvePath(argv, "./logs"));
Expand Down
14 changes: 7 additions & 7 deletions website/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ <h2 class="text-gray-500 text-lg md:text-xl">
</td>
<td class="p-4 align-middle">
<a
href="https://github.com/the-guild-org/federation-compatibility/tree/main/REPORT.md#hive"
href="https://github.com/the-guild-org/federation-compatibility/tree/main/REPORT.md#hive-gateway"
class="text-sky-700 hover:underline"
>View report</a
>
Expand Down Expand Up @@ -252,7 +252,7 @@ <h2 class="text-gray-500 text-lg md:text-xl">
</td>
<td class="p-4 align-middle">
<a
href="https://github.com/the-guild-org/federation-compatibility/tree/main/REPORT.md#router"
href="https://github.com/the-guild-org/federation-compatibility/tree/main/REPORT.md#apollo-router"
class="text-sky-700 hover:underline"
>View report</a
>
Expand Down Expand Up @@ -312,7 +312,7 @@ <h2 class="text-gray-500 text-lg md:text-xl">
</td>
<td class="p-4 align-middle">
<a
href="https://github.com/the-guild-org/federation-compatibility/tree/main/REPORT.md#router-native"
href="https://github.com/the-guild-org/federation-compatibility/tree/main/REPORT.md#apollo-router-native"
class="text-sky-700 hover:underline"
>View report</a
>
Expand Down Expand Up @@ -342,7 +342,7 @@ <h2 class="text-gray-500 text-lg md:text-xl">
</td>
<td class="p-4 align-middle">
<a
href="https://github.com/the-guild-org/federation-compatibility/tree/main/REPORT.md#cosmo"
href="https://github.com/the-guild-org/federation-compatibility/tree/main/REPORT.md#cosmo-router"
class="text-sky-700 hover:underline"
>View report</a
>
Expand Down Expand Up @@ -372,7 +372,7 @@ <h2 class="text-gray-500 text-lg md:text-xl">
</td>
<td class="p-4 align-middle">
<a
href="https://github.com/the-guild-org/federation-compatibility/tree/main/REPORT.md#grafbase"
href="https://github.com/the-guild-org/federation-compatibility/tree/main/REPORT.md#grafbase-gateway"
class="text-sky-700 hover:underline"
>View report</a
>
Expand Down Expand Up @@ -516,8 +516,8 @@ <h4 class="text-lg font-semibold pt-4 group" id="methodology">
href="https://the-guild.dev/graphql/mesh"
title="GraphQL Federation Gateway"
>GraphQL Mesh</a
> (now Hive Gateway)
and
>
(now Hive Gateway) and
<a
href="https://the-guild.dev/graphql/hive"
title="Open-Source GraphQL Federation Platform: Schema Registry and Observability"
Expand Down

0 comments on commit 488b817

Please sign in to comment.