-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 42be834
Showing
33 changed files
with
5,168 additions
and
0 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,11 @@ | ||
FROM node:14-alpine | ||
WORKDIR /apollo-federation-testing/graph-router | ||
COPY . /apollo-federation-testing/graph-router | ||
RUN rm -frv /apollo-federation-testing/graph-router/src/implementations/* | ||
RUN rm -frv /apollo-federation-testing/.docker/* | ||
RUN rm -frv /apollo-federation-testing/.vscode/* | ||
RUN rm -frv /apollo-federation-testing/.deployments/* | ||
RUN rm -frv /apollo-federation-testing/node_modules/* | ||
RUN npm install | ||
EXPOSE 4000 | ||
CMD [ "npm", "run", "start:graph-router" ] |
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,18 @@ | ||
FROM node:14-alpine | ||
WORKDIR /apollo-federation-testing/inventory | ||
COPY . /apollo-federation-testing/inventory | ||
RUN rm -frv /apollo-federation-testing/inventory/src/implementations/* | ||
RUN rm -frv /apollo-federation-testing/inventory/src/gateway.ts | ||
RUN rm -frv /apollo-federation-testing/inventory/src/index.ts | ||
RUN rm -frv /apollo-federation-testing/inventory/src/subgraphs/users.ts | ||
RUN rm -frv /apollo-federation-testing/inventory/src/subgraphs/users.graphql | ||
RUN rm -frv /apollo-federation-testing/inventory/src/subgraphs/products.graphql | ||
RUN rm -frv /apollo-federation-testing/.docker/* | ||
RUN rm -frv /apollo-federation-testing/.vscode/* | ||
RUN rm -frv /apollo-federation-testing/.deployments/* | ||
RUN rm -frv /apollo-federation-testing/node_modules/* | ||
RUN npm install | ||
RUN npm uninstall @apollo/gateway | ||
RUN npm uninstall concurrently | ||
EXPOSE 4003 | ||
CMD [ "npm", "run", "start:inventory" ] |
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,18 @@ | ||
FROM node:14-alpine | ||
WORKDIR /apollo-federation-testing/users | ||
COPY . /apollo-federation-testing/users | ||
RUN rm -frv /apollo-federation-testing/users/src/implementations/* | ||
RUN rm -frv /apollo-federation-testing/users/src/gateway.ts | ||
RUN rm -frv /apollo-federation-testing/users/src/index.ts | ||
RUN rm -frv /apollo-federation-testing/users/src/subgraphs/inventory.ts | ||
RUN rm -frv /apollo-federation-testing/users/src/subgraphs/inventory.graphql | ||
RUN rm -frv /apollo-federation-testing/users/src/subgraphs/products.graphql | ||
RUN rm -frv /apollo-federation-testing/.docker/* | ||
RUN rm -frv /apollo-federation-testing/.vscode/* | ||
RUN rm -frv /apollo-federation-testing/.deployments/* | ||
RUN rm -frv /apollo-federation-testing/node_modules/* | ||
RUN npm install | ||
RUN npm uninstall @apollo/gateway | ||
RUN npm uninstall concurrently | ||
EXPOSE 4002 | ||
CMD [ "npm", "run", "start:users" ] |
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 @@ | ||
node_modules | ||
npm-debug.log |
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 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto |
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,31 @@ | ||
# Ignore the compiled output. | ||
dist/ | ||
|
||
# TypeScript incremental compilation cache | ||
*.tsbuildinfo | ||
|
||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Coverage (from Jest) | ||
coverage/ | ||
|
||
# JUnit Reports (used mainly in CircleCI) | ||
reports/ | ||
junit.xml | ||
|
||
# Node modules | ||
node_modules/ | ||
|
||
# Mac OS | ||
.DS_Store | ||
|
||
# Intellij Configuration Files | ||
.idea/ | ||
|
||
results.md | ||
supergraph.graphql |
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,74 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "pwa-node", | ||
"request": "launch", | ||
"name": "Debug Test", | ||
"skipFiles": [ | ||
"<node_internals>/**" | ||
], | ||
"program": "${workspaceFolder}/dist/index.js", | ||
"outFiles": [ | ||
"${workspaceFolder}/**/*.js" | ||
], | ||
"preLaunchTask": "npm: build:compile" | ||
}, | ||
{ | ||
"type": "pwa-node", | ||
"request": "launch", | ||
"name": "Debug Gateway", | ||
"skipFiles": [ | ||
"<node_internals>/**" | ||
], | ||
"program": "${workspaceFolder}/dist/gateway.js", | ||
"outFiles": [ | ||
"${workspaceFolder}/**/*.js" | ||
], | ||
"preLaunchTask": "npm: build" | ||
}, | ||
{ | ||
"type": "pwa-node", | ||
"request": "launch", | ||
"name": "Debug Users", | ||
"skipFiles": [ | ||
"<node_internals>/**" | ||
], | ||
"program": "${workspaceFolder}/dist/subgraphs/users.js", | ||
"outFiles": [ | ||
"${workspaceFolder}/**/*.js" | ||
], | ||
"preLaunchTask": "npm: build:compile" | ||
}, | ||
{ | ||
"type": "pwa-node", | ||
"request": "launch", | ||
"name": "Debug Inventory", | ||
"skipFiles": [ | ||
"<node_internals>/**" | ||
], | ||
"program": "${workspaceFolder}/dist/subgraphs/inventory.js", | ||
"outFiles": [ | ||
"${workspaceFolder}/**/*.js" | ||
], | ||
"preLaunchTask": "npm: build:compile" | ||
}, | ||
{ | ||
"type": "pwa-node", | ||
"request": "launch", | ||
"name": "Debug Products", | ||
"skipFiles": [ | ||
"<node_internals>/**" | ||
], | ||
"program": "dist/index.js", | ||
"outFiles": [ | ||
"${workspaceFolder}/**/*.js" | ||
], | ||
"preLaunchTask": "build", | ||
"cwd": "${workspaceFolder}/src/implementations/apollo-server" | ||
} | ||
] | ||
} |
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,12 @@ | ||
{ | ||
// See https://go.microsoft.com/fwlink/?LinkId=733558 | ||
// for the documentation about the tasks.json format | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "build", | ||
"type": "shell", | ||
"command": "cd src/implementations/apollo-server && npm run build" | ||
} | ||
] | ||
} |
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 @@ | ||
## Setup | ||
|
||
|
||
1. `export CHANGE_MINIKUBE_NONE_USER` | ||
2. `minikube start` | ||
3. `npm i` (this will also run a `postinstall` that will build the base project assets and push the images into `minikube`) | ||
- `npm run build` - compiles typescript code and composes supergraph SDL | ||
- `npm run docker` - build docker images for `graph-router`, `users` and `inventory` | ||
- `npm run minikube:load` - load docker images for `graph-router`, `users` and `inventory` to `minikube` | ||
- `npm run minikube:deploy` - apply deployment yaml files for `graph-router`, `users`, `inventory` to minikube | ||
- `npm run minikube:expose` - expose ports for deployments | ||
4. `minikube tunnel` - _note this is required for an external-ip to get assigned_ | ||
5. `npm run minikube:ip:graph-router` _(optional)_- this is how you can get the IP address of the graph router running in minikube. There are also similar commands for `users` and `inventory` | ||
|
||
## Running the Test | ||
|
||
|
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 @@ | ||
<mxfile> | ||
<diagram id="eWnmgXn1XkVClgfd-X_6" name="Page-1"> | ||
<mxGraphModel dx="1302" dy="623" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0"> | ||
<root> | ||
<mxCell id="0"/> | ||
<mxCell id="1" parent="0"/> | ||
<mxCell id="4" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="2" target="3"> | ||
<mxGeometry relative="1" as="geometry"/> | ||
</mxCell> | ||
<mxCell id="2" value="Start" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1"> | ||
<mxGeometry x="20" y="55" width="120" height="60" as="geometry"/> | ||
</mxCell> | ||
<mxCell id="6" value="No" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="3"> | ||
<mxGeometry relative="1" as="geometry"> | ||
<mxPoint x="450" y="85" as="targetPoint"/> | ||
</mxGeometry> | ||
</mxCell> | ||
<mxCell id="11" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="3"> | ||
<mxGeometry relative="1" as="geometry"> | ||
<mxPoint x="290" y="230" as="targetPoint"/> | ||
</mxGeometry> | ||
</mxCell> | ||
<mxCell id="3" value="query { _service { sdl } }<br>does this work?" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1"> | ||
<mxGeometry x="200" y="20" width="180" height="130" as="geometry"/> | ||
</mxCell> | ||
<mxCell id="9" value="Unable&nbsp;" style="shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;dashed=0;" vertex="1" parent="1"> | ||
<mxGeometry x="580" y="20" width="260" height="145" as="geometry"/> | ||
</mxCell> | ||
<mxCell id="12" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1"> | ||
<mxGeometry x="230" y="230" width="120" height="60" as="geometry"/> | ||
</mxCell> | ||
</root> | ||
</mxGraphModel> | ||
</diagram> | ||
</mxfile> |
Oops, something went wrong.