Skip to content
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

Update router to latest version + minor fixes #181

Merged
merged 3 commits into from
Mar 13, 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
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,13 @@ You will need a GraphOS organization with an Enterprise plan or [Enterprise tria
```

```
npm run start:spotify && npm run start:playback
npm run start:spotify
```

and in another terminal:

```
npm run start:playback
```

- Spotify Subgraph - http://localhost:4001
Expand Down
78 changes: 38 additions & 40 deletions package-lock.json

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

5 changes: 1 addition & 4 deletions router/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
FROM ghcr.io/apollographql/router:v1.32.0
FROM ghcr.io/apollographql/router:v1.40.1
COPY router.yaml /dist/router.yaml
COPY rhai /dist/rhai

COPY ./entrypoint.sh ./entrypoint.sh
COPY ./wait-for-it.sh ./wait-for-it.sh
# better safe than sorry
RUN chmod +x ./wait-for-it.sh && \
chmod +x ./entrypoint.sh

Comment on lines -7 to -9
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was throwing an error for me, and I don't think it is needed, so I removed it 😊

ENTRYPOINT [ "./entrypoint.sh" ]
7 changes: 3 additions & 4 deletions router/router.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ supergraph:
introspection: true
listen: 0.0.0.0:${env.PORT:-4000}
query_planning:
experimental_cache:
cache:
in_memory:
limit: 512 #This is the default value
limit: 512 # This is the default value
homepage:
enabled: false
include_subgraph_errors:
Expand All @@ -44,7 +44,6 @@ apq:
cache:
in_memory:
limit: 512 # This is the default value

persisted_queries:
enabled: true
safelist:
Expand All @@ -66,7 +65,7 @@ persisted_queries:
subscription:
enabled: true
mode:
preview_callback:
callback:
public_url: ${env.CALLBACK_URL} # https://spotify-showcase-production-d157.up.railway.app/callback # The router's public URL
listen: 0.0.0.0:${env.PORT:-4000} # The IP address and port the router will listen on for subscription callbacks
path: /callback # The path of the router's callback endpoint
Expand Down
2 changes: 1 addition & 1 deletion spotify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ subgraphs:
schema:
file: subgraphs/playback/schema.graphql
operations: {}
federation_version: '=2.4.5'
federation_version: '=2.7.1'
6 changes: 3 additions & 3 deletions subgraphs/playback/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
"lint:types": "tsc --noEmit"
},
"dependencies": {
"@apollo/server": "^4.9.3",
"@apollo/subgraph": "^2.5.5",
"@apollo/server": "^4.10.1",
"@apollo/subgraph": "^2.7.1",
"@graphql-tools/mock": "^9.0.0",
"@sentry/node": "^7.59.3",
"@shared/field-synthetics": "*",
Expand All @@ -36,7 +36,7 @@
"cookie-parser": "^1.4.6",
"cors": "^2.8.5",
"express": "^4.18.2",
"graphql": "^16.6.0",
"graphql": "^16.8.1",
"graphql-tag": "latest",
"graphql-ws": "^5.13.1",
"lodash": "^4.17.21",
Expand Down
Loading