diff --git a/README.md b/README.md index f986ed7f..0393ba72 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/package-lock.json b/package-lock.json index 96480a04..e1230705 100644 --- a/package-lock.json +++ b/package-lock.json @@ -251,9 +251,9 @@ } }, "node_modules/@apollo/federation-internals": { - "version": "2.5.5", - "resolved": "https://registry.npmjs.org/@apollo/federation-internals/-/federation-internals-2.5.5.tgz", - "integrity": "sha512-6Ywx10Jweuoq9p913HwtIUuJt+uI+hAw5g/Tv/yIA04FNwdPETkLe6Jbz7mnXdGV0b30YcPME2NnKnIu7s/5AA==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/@apollo/federation-internals/-/federation-internals-2.7.1.tgz", + "integrity": "sha512-xJPF8qrqzYxY2pXLODihMbCo7dyNwiAIlWzJ4fF3G6cuje1HD9Ke3l8qAPooeQLb2OqRoHhtc+hhwMDc8AOYoQ==", "dependencies": { "@types/uuid": "^9.0.0", "chalk": "^4.1.0", @@ -351,9 +351,9 @@ } }, "node_modules/@apollo/server": { - "version": "4.9.3", - "resolved": "https://registry.npmjs.org/@apollo/server/-/server-4.9.3.tgz", - "integrity": "sha512-U56Sx/UmzR3Es344hQ/Ptf2EJrH+kV4ZPoLmgGjWoiwf2wYQ/pRSvkSXgjOvoyE34wSa8Gh7f92ljfLfY+6q1w==", + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/@apollo/server/-/server-4.10.1.tgz", + "integrity": "sha512-XGMOgTyzV4EBHQq0xQVKFry9hZF7AA/6nxxGLamqdxodhdSdGbU9jrlb5/XDveeGuXP3+5JDdrB2HcziVLJcMA==", "dependencies": { "@apollo/cache-control-types": "^1.0.3", "@apollo/server-gateway-interface": "^1.1.1", @@ -371,7 +371,6 @@ "@types/express-serve-static-core": "^4.17.30", "@types/node-fetch": "^2.6.1", "async-retry": "^1.2.1", - "body-parser": "^1.20.0", "cors": "^2.8.5", "express": "^4.17.1", "loglevel": "^1.6.8", @@ -567,12 +566,12 @@ } }, "node_modules/@apollo/subgraph": { - "version": "2.5.5", - "resolved": "https://registry.npmjs.org/@apollo/subgraph/-/subgraph-2.5.5.tgz", - "integrity": "sha512-r1r0qMzR6gHK6EoKFpIwcSNID+A78zbqLmCynMV+GYnWt3BvyydtPaw4DgQFo+oMSnEBvk4nI7P3v+xZg4FdSQ==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/@apollo/subgraph/-/subgraph-2.7.1.tgz", + "integrity": "sha512-JYxMOnBbPbTJ3ySUyi4tKFOHtAkMy5pzyzskGyky0aqXWCqLm2Vd92kmmtcbAtXAvkaRVGT8ONlTHAw5lvVa0Q==", "dependencies": { "@apollo/cache-control-types": "^1.0.2", - "@apollo/federation-internals": "2.5.5" + "@apollo/federation-internals": "2.7.1" }, "engines": { "node": ">=14.15.0" @@ -6293,9 +6292,9 @@ "integrity": "sha512-cputDpIbFgLUaGQn6Vqg3/YsJwxUwHLO13v3i5ouxT4lat0khip9AEWxtERujXV9wxIB1EyF97BSJFt6vpdI8g==" }, "node_modules/@types/uuid": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.4.tgz", - "integrity": "sha512-zAuJWQflfx6dYJM62vna+Sn5aeSWhh3OB+wfUEACNcqUSc0AGc5JKl+ycL1vrH7frGTXhJchYjE1Hak8L819dA==" + "version": "9.0.8", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.8.tgz", + "integrity": "sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==" }, "node_modules/@types/ws": { "version": "8.5.5", @@ -10346,9 +10345,9 @@ "dev": true }, "node_modules/graphql": { - "version": "16.7.1", - "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.7.1.tgz", - "integrity": "sha512-DRYR9tf+UGU0KOsMcKAlXeFfX89UiiIZ0dRU3mR0yJfu6OjZqUcp68NnFLnqQU5RexygFoDy1EW+ccOYcPfmHg==", + "version": "16.8.1", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.8.1.tgz", + "integrity": "sha512-59LZHPdGZVh695Ud9lRzPBVTtlX9ZCV150Er2W43ro37wVof0ctenSaskPPjN7lVTIN8mSZt8PHUNKZuNQUuxw==", "engines": { "node": "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0" } @@ -18935,8 +18934,8 @@ "version": "0.0.0", "license": "MIT", "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": "*", @@ -18946,7 +18945,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", @@ -19214,9 +19213,9 @@ } }, "@apollo/federation-internals": { - "version": "2.5.5", - "resolved": "https://registry.npmjs.org/@apollo/federation-internals/-/federation-internals-2.5.5.tgz", - "integrity": "sha512-6Ywx10Jweuoq9p913HwtIUuJt+uI+hAw5g/Tv/yIA04FNwdPETkLe6Jbz7mnXdGV0b30YcPME2NnKnIu7s/5AA==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/@apollo/federation-internals/-/federation-internals-2.7.1.tgz", + "integrity": "sha512-xJPF8qrqzYxY2pXLODihMbCo7dyNwiAIlWzJ4fF3G6cuje1HD9Ke3l8qAPooeQLb2OqRoHhtc+hhwMDc8AOYoQ==", "requires": { "@types/uuid": "^9.0.0", "chalk": "^4.1.0", @@ -19279,9 +19278,9 @@ } }, "@apollo/server": { - "version": "4.9.3", - "resolved": "https://registry.npmjs.org/@apollo/server/-/server-4.9.3.tgz", - "integrity": "sha512-U56Sx/UmzR3Es344hQ/Ptf2EJrH+kV4ZPoLmgGjWoiwf2wYQ/pRSvkSXgjOvoyE34wSa8Gh7f92ljfLfY+6q1w==", + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/@apollo/server/-/server-4.10.1.tgz", + "integrity": "sha512-XGMOgTyzV4EBHQq0xQVKFry9hZF7AA/6nxxGLamqdxodhdSdGbU9jrlb5/XDveeGuXP3+5JDdrB2HcziVLJcMA==", "requires": { "@apollo/cache-control-types": "^1.0.3", "@apollo/server-gateway-interface": "^1.1.1", @@ -19299,7 +19298,6 @@ "@types/express-serve-static-core": "^4.17.30", "@types/node-fetch": "^2.6.1", "async-retry": "^1.2.1", - "body-parser": "^1.20.0", "cors": "^2.8.5", "express": "^4.17.1", "loglevel": "^1.6.8", @@ -19439,12 +19437,12 @@ } }, "@apollo/subgraph": { - "version": "2.5.5", - "resolved": "https://registry.npmjs.org/@apollo/subgraph/-/subgraph-2.5.5.tgz", - "integrity": "sha512-r1r0qMzR6gHK6EoKFpIwcSNID+A78zbqLmCynMV+GYnWt3BvyydtPaw4DgQFo+oMSnEBvk4nI7P3v+xZg4FdSQ==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/@apollo/subgraph/-/subgraph-2.7.1.tgz", + "integrity": "sha512-JYxMOnBbPbTJ3ySUyi4tKFOHtAkMy5pzyzskGyky0aqXWCqLm2Vd92kmmtcbAtXAvkaRVGT8ONlTHAw5lvVa0Q==", "requires": { "@apollo/cache-control-types": "^1.0.2", - "@apollo/federation-internals": "2.5.5" + "@apollo/federation-internals": "2.7.1" } }, "@apollo/usage-reporting-protobuf": { @@ -23508,9 +23506,9 @@ "integrity": "sha512-cputDpIbFgLUaGQn6Vqg3/YsJwxUwHLO13v3i5ouxT4lat0khip9AEWxtERujXV9wxIB1EyF97BSJFt6vpdI8g==" }, "@types/uuid": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.4.tgz", - "integrity": "sha512-zAuJWQflfx6dYJM62vna+Sn5aeSWhh3OB+wfUEACNcqUSc0AGc5JKl+ycL1vrH7frGTXhJchYjE1Hak8L819dA==" + "version": "9.0.8", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.8.tgz", + "integrity": "sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==" }, "@types/ws": { "version": "8.5.5", @@ -26536,9 +26534,9 @@ "dev": true }, "graphql": { - "version": "16.7.1", - "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.7.1.tgz", - "integrity": "sha512-DRYR9tf+UGU0KOsMcKAlXeFfX89UiiIZ0dRU3mR0yJfu6OjZqUcp68NnFLnqQU5RexygFoDy1EW+ccOYcPfmHg==" + "version": "16.8.1", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.8.1.tgz", + "integrity": "sha512-59LZHPdGZVh695Ud9lRzPBVTtlX9ZCV150Er2W43ro37wVof0ctenSaskPPjN7lVTIN8mSZt8PHUNKZuNQUuxw==" }, "graphql-config": { "version": "5.0.2", @@ -29858,8 +29856,8 @@ "playback-subgraph": { "version": "file:subgraphs/playback", "requires": { - "@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", "@sentry/types": "^7.59.3", @@ -29874,7 +29872,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", "jest": "^29.0.3", diff --git a/router/Dockerfile b/router/Dockerfile index 5ed8d204..c6272337 100644 --- a/router/Dockerfile +++ b/router/Dockerfile @@ -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 ENTRYPOINT [ "./entrypoint.sh" ] diff --git a/router/router.yaml b/router/router.yaml index 45d9d324..e77c91e2 100644 --- a/router/router.yaml +++ b/router/router.yaml @@ -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: @@ -44,7 +44,6 @@ apq: cache: in_memory: limit: 512 # This is the default value - persisted_queries: enabled: true safelist: @@ -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 diff --git a/spotify.yaml b/spotify.yaml index 0367e4b6..9b5905cd 100644 --- a/spotify.yaml +++ b/spotify.yaml @@ -9,4 +9,4 @@ subgraphs: schema: file: subgraphs/playback/schema.graphql operations: {} -federation_version: '=2.4.5' +federation_version: '=2.7.1' diff --git a/subgraphs/playback/package.json b/subgraphs/playback/package.json index dee9873f..60d09cb6 100644 --- a/subgraphs/playback/package.json +++ b/subgraphs/playback/package.json @@ -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": "*", @@ -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",