Skip to content

Commit

Permalink
Upgrading to the latest strapi plugin
Browse files Browse the repository at this point in the history
setting maximum parallel requests to stop hammering strapi
  • Loading branch information
travjenkins committed Feb 21, 2025
1 parent 396d323 commit 33ff29c
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 62 deletions.
2 changes: 2 additions & 0 deletions gatsby-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ process.env.POSTGRAPHILE_PREPARED_STATEMENT_CACHE_SIZE = '1';
const strapiConfig = {
apiURL: process.env.STRAPI_API_URL,
accessToken: process.env.STRAPI_TOKEN,
maxParallelRequests: 3,
version: 4, // They now assume v5
collectionTypes: [
'blog-post',
'company-update-post',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"gatsby-remark-responsive-iframe": "^6.8.0",
"gatsby-source-filesystem": "^5.13.1",
"gatsby-source-pg": "^1.0.0-rc.0",
"gatsby-source-strapi": "^3.3.3",
"gatsby-source-strapi": "^5.0.2",
"gatsby-transformer-inline-svg": "^1.2.0",
"gatsby-transformer-rehype": "^2.0.1",
"gatsby-transformer-remark": "^6.13.1",
Expand Down
136 changes: 75 additions & 61 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1123,7 +1123,7 @@
dependencies:
regenerator-runtime "^0.13.4"

"@babel/runtime@^7.0.0", "@babel/runtime@^7.12.5", "@babel/runtime@^7.20.13", "@babel/runtime@^7.21.0", "@babel/runtime@^7.8.4", "@babel/runtime@^7.9.2":
"@babel/runtime@^7.0.0", "@babel/runtime@^7.12.5", "@babel/runtime@^7.21.0", "@babel/runtime@^7.8.4", "@babel/runtime@^7.9.2":
version "7.26.7"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.26.7.tgz#f4e7fe527cd710f8dc0618610b61b4b060c3c341"
integrity sha512-AOPI3D+a8dXnja+iwsUqGRjr1BbZIe771sXdapOtYI531gSqpi92vXivKcq2asu/DFpdl1ceFAKZyRzK2PCVcQ==
Expand All @@ -1144,6 +1144,13 @@
dependencies:
regenerator-runtime "^0.14.0"

"@babel/runtime@^7.20.13":
version "7.26.9"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.26.9.tgz#aa4c6facc65b9cb3f87d75125ffd47781b475433"
integrity sha512-aA63XwOkcl4xxQa3HjPMqOP6LiK0ZDv3mUPYEFXkpHbaFjtGggE1A61FjFzJnB+p7/oy2gA8E+rcBNl/zC1tMg==
dependencies:
regenerator-runtime "^0.14.0"

"@babel/runtime@^7.25.0", "@babel/runtime@^7.25.6":
version "7.25.7"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.25.7.tgz#7ffb53c37a8f247c8c4d335e89cdf16a2e0d0fb6"
Expand Down Expand Up @@ -3321,10 +3328,10 @@
"@types/node" "*"
form-data "^4.0.0"

"@types/node@*", "@types/node@>=10.0.0":
version "22.13.2"
resolved "https://registry.yarnpkg.com/@types/node/-/node-22.13.2.tgz#6f401c5ccadac75354f5652128e9fcc3b0cf23b7"
integrity sha512-Z+r8y3XL9ZpI2EY52YYygAFmo2/oWfNSj4BCpAXE2McAexDk8VcnBMGC9Djn9gTKt4d2T/hhXqmPzo4hfIXtTg==
"@types/node@*":
version "22.13.4"
resolved "https://registry.yarnpkg.com/@types/node/-/node-22.13.4.tgz#3fe454d77cd4a2d73c214008b3e331bfaaf5038a"
integrity sha512-ywP2X0DYtX3y08eFVx5fNIw7/uIv8hYUKgXoK8oayJlLnKcRfEYCxWMVE1XagUdVtCJlZT1AU4LXEABW+L1Peg==
dependencies:
undici-types "~6.20.0"

Expand All @@ -3333,6 +3340,13 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.45.tgz#2c0fafd78705e7a18b7906b5201a522719dc5190"
integrity sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==

"@types/node@>=10.0.0":
version "22.13.2"
resolved "https://registry.yarnpkg.com/@types/node/-/node-22.13.2.tgz#6f401c5ccadac75354f5652128e9fcc3b0cf23b7"
integrity sha512-Z+r8y3XL9ZpI2EY52YYygAFmo2/oWfNSj4BCpAXE2McAexDk8VcnBMGC9Djn9gTKt4d2T/hhXqmPzo4hfIXtTg==
dependencies:
undici-types "~6.20.0"

"@types/node@^8.5.7":
version "8.10.66"
resolved "https://registry.yarnpkg.com/@types/node/-/node-8.10.66.tgz#dd035d409df322acc83dff62a602f12a5783bbb3"
Expand Down Expand Up @@ -4384,12 +4398,12 @@ axe-core@^4.10.0:
resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.10.2.tgz#85228e3e1d8b8532a27659b332e39b7fa0e022df"
integrity sha512-RE3mdQ7P3FRSe7eqCWoeQ/Z9QXrtniSjp1wUjt5nRC3WIpz5rSCve6o3fsZ2aCpJtrZjSZgjwXAoTO5k4tEI0w==

axios@1.6.3:
version "1.6.3"
resolved "https://registry.yarnpkg.com/axios/-/axios-1.6.3.tgz#7f50f23b3aa246eff43c54834272346c396613f4"
integrity sha512-fWyNdeawGam70jXSVlKl+SUNVcL6j6W79CuSIPfi6HnDUmSCH6gyUys/HrqHeA/wU0Az41rRgean494d0Jb+ww==
axios@1.7.9, axios@^1.6.4:
version "1.7.9"
resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.9.tgz#d7d071380c132a24accda1b2cfc1535b79ec650a"
integrity sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw==
dependencies:
follow-redirects "^1.15.0"
follow-redirects "^1.15.6"
form-data "^4.0.0"
proxy-from-env "^1.1.0"

Expand All @@ -4402,15 +4416,6 @@ axios@^1.2.1:
form-data "^4.0.0"
proxy-from-env "^1.1.0"

axios@^1.6.4:
version "1.7.9"
resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.9.tgz#d7d071380c132a24accda1b2cfc1535b79ec650a"
integrity sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw==
dependencies:
follow-redirects "^1.15.6"
form-data "^4.0.0"
proxy-from-env "^1.1.0"

axobject-query@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-4.1.0.tgz#28768c76d0e3cff21bc62a9e2d0b6ac30042a1ee"
Expand Down Expand Up @@ -5287,15 +5292,14 @@ commondir@^1.0.1:
resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b"
integrity sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==

commonmark@^0.30.0:
version "0.30.0"
resolved "https://registry.yarnpkg.com/commonmark/-/commonmark-0.30.0.tgz#38811dc7bbf0f59d277ae09054d4d73a332f2e45"
integrity sha512-j1yoUo4gxPND1JWV9xj5ELih0yMv1iCWDG6eEQIPLSWLxzCXiFoyS7kvB+WwU+tZMf4snwJMMtaubV0laFpiBA==
commonmark@^0.31.2:
version "0.31.2"
resolved "https://registry.yarnpkg.com/commonmark/-/commonmark-0.31.2.tgz#9d8d5439c82c9a235154d858a53e1a7965d573a5"
integrity sha512-2fRLTyb9r/2835k5cwcAwOj0DEc44FARnMp5veGsJ+mEAZdi52sNopLu07ZyElQUz058H43whzlERDIaaSw4rg==
dependencies:
entities "~2.0"
entities "~3.0.1"
mdurl "~1.0.1"
minimist ">=1.2.2"
string.prototype.repeat "^0.2.0"
minimist "~1.2.8"

compressible@~2.0.18:
version "2.0.18"
Expand Down Expand Up @@ -6290,10 +6294,10 @@ entities@^4.2.0, entities@^4.3.0, entities@^4.4.0:
resolved "https://registry.yarnpkg.com/entities/-/entities-4.4.0.tgz#97bdaba170339446495e653cfd2db78962900174"
integrity sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA==

entities@~2.0:
version "2.0.3"
resolved "https://registry.yarnpkg.com/entities/-/entities-2.0.3.tgz#5c487e5742ab93c15abb5da22759b8590ec03b7f"
integrity sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ==
entities@~3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/entities/-/entities-3.0.1.tgz#2b887ca62585e96db3903482d336c1006c3001d4"
integrity sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==

envinfo@^7.10.0:
version "7.14.0"
Expand Down Expand Up @@ -6493,9 +6497,9 @@ es-module-lexer@^1.2.1:
integrity sha512-qqnD1yMU6tk/jnaMosogGySTZP8YtUgAffA9nMN+E/rjxcfRQ6IEk7IiozUjgxKoFHBGjTLnrHB/YC45r/59EQ==

es-object-atoms@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.0.0.tgz#ddb55cd47ac2e240701260bc2a8e31ecb643d941"
integrity sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==
version "1.1.1"
resolved "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.1.1.tgz#1c4f2c4837327597ce69d2ca190a7fdd172338c1"
integrity sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==
dependencies:
es-errors "^1.3.0"

Expand Down Expand Up @@ -7425,7 +7429,7 @@ flexsearch@^0.6.22, flexsearch@^0.6.32:
resolved "https://registry.yarnpkg.com/flexsearch/-/flexsearch-0.6.32.tgz#1e20684d317af65baa445cdd9864a5f5b320f510"
integrity sha512-EF1BWkhwoeLtbIlDbY/vDSLBen/E5l/f1Vg7iX5CDymQCamcx1vhlc3tIZxIDplPjgi0jhG37c67idFbjg+v+Q==

follow-redirects@^1.15.0, follow-redirects@^1.15.6:
follow-redirects@^1.15.6:
version "1.15.6"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b"
integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==
Expand Down Expand Up @@ -7462,12 +7466,13 @@ form-data-encoder@^2.1.2:
integrity sha512-yDYSgNMraqvnxiEXO4hi88+YZxaHC6QKzb5N84iRCTDeRO7ZALpir/lVmf/uXUhnwUr2O4HU8s/n6x+yNjQkHw==

form-data@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452"
integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==
version "4.0.2"
resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.2.tgz#35cabbdd30c3ce73deb2c42d3c8d3ed9ca51794c"
integrity sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==
dependencies:
asynckit "^0.4.0"
combined-stream "^1.0.8"
es-set-tostringtag "^2.1.0"
mime-types "^2.1.12"

format@^0.2.0:
Expand Down Expand Up @@ -8123,7 +8128,7 @@ gatsby-source-filesystem@^3.0.0:
valid-url "^1.0.9"
xstate "^4.14.0"

gatsby-source-filesystem@^5.13.0, gatsby-source-filesystem@^5.13.1:
gatsby-source-filesystem@^5.13.1:
version "5.13.1"
resolved "https://registry.yarnpkg.com/gatsby-source-filesystem/-/gatsby-source-filesystem-5.13.1.tgz#1aad8f969fbfd4efe6f7cfcd8542253f54fdbd8a"
integrity sha512-nFWzOBpi84nDeVNeO7bpKL9mVYMl1tfjJmE5l868YATFShGzZnA6qMd200XCsf78PexZHAiV/P1MlsyKqjJduA==
Expand All @@ -8138,6 +8143,21 @@ gatsby-source-filesystem@^5.13.0, gatsby-source-filesystem@^5.13.1:
valid-url "^1.0.9"
xstate "^4.38.0"

gatsby-source-filesystem@^5.14.0:
version "5.14.0"
resolved "https://registry.yarnpkg.com/gatsby-source-filesystem/-/gatsby-source-filesystem-5.14.0.tgz#f2c765f2eead173918b3d1bc92626bc770867972"
integrity sha512-uewEJaHvdxZlN6DOtZCIUuI7X5v9MRk5IVpCYy9SIZCDbnUA5siEd2A4SC+kcXxJM6AUbdvkfayqpVJrm5JaZA==
dependencies:
"@babel/runtime" "^7.20.13"
chokidar "^3.5.3"
file-type "^16.5.4"
fs-extra "^11.2.0"
gatsby-core-utils "^4.14.0"
mime "^3.0.0"
pretty-bytes "^5.6.0"
valid-url "^1.0.9"
xstate "^4.38.0"

gatsby-source-graphql@^4.2.0:
version "4.25.0"
resolved "https://registry.yarnpkg.com/gatsby-source-graphql/-/gatsby-source-graphql-4.25.0.tgz#f827c3a6b1d773b221612be1cdb4807b82f76fd6"
Expand All @@ -8163,16 +8183,16 @@ gatsby-source-pg@^1.0.0-rc.0:
pg "^8.7.1"
postgraphile "^4.12.5"

gatsby-source-strapi@^3.3.3:
version "3.3.3"
resolved "https://registry.yarnpkg.com/gatsby-source-strapi/-/gatsby-source-strapi-3.3.3.tgz#5b26d3f245c55048ddb9376aea9d36d3f9de42bd"
integrity sha512-8IrYf/i0g7LTsnQlkE55hxnGRaLSwiHJTc1IbuLEOHFUXIGRgPKgT+jruoDm7fPFZUSHbkjwZgR22UJN573xCg==
gatsby-source-strapi@^5.0.2:
version "5.0.2"
resolved "https://registry.yarnpkg.com/gatsby-source-strapi/-/gatsby-source-strapi-5.0.2.tgz#6f13aabb25ebb02915dbbfd4604c803350078e11"
integrity sha512-romGRTpSIyfxpGGl9gvUz0VZPKpqMOEnuKLFiIFXxLY4PbJFQeyRAMQotzUdYS4aiiGCHJB2+ZWbOjE4xRhcJw==
dependencies:
axios "1.6.3"
commonmark "^0.30.0"
gatsby-source-filesystem "^5.13.0"
axios "1.7.9"
commonmark "^0.31.2"
gatsby-source-filesystem "^5.14.0"
lodash "^4.17.21"
qs "^6.11.2"
qs "^6.13.1"

gatsby-telemetry@^2.15.0:
version "2.15.0"
Expand Down Expand Up @@ -10903,7 +10923,7 @@ minimist-options@4.1.0:
is-plain-obj "^1.1.0"
kind-of "^6.0.3"

minimist@>=1.2.2, minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.6:
minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.6, minimist@~1.2.8:
version "1.2.8"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c"
integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==
Expand Down Expand Up @@ -12436,12 +12456,12 @@ qs@6.13.0:
dependencies:
side-channel "^1.0.6"

qs@^6.11.2:
version "6.11.2"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.2.tgz#64bea51f12c1f5da1bc01496f48ffcff7c69d7d9"
integrity sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==
qs@^6.13.1:
version "6.14.0"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.14.0.tgz#c63fa40680d2c5c941412a0e899c89af60c0a930"
integrity sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==
dependencies:
side-channel "^1.0.4"
side-channel "^1.1.0"

qs@^6.9.4:
version "6.11.1"
Expand Down Expand Up @@ -12801,11 +12821,10 @@ readable-stream@^4.7.0:
string_decoder "^1.3.0"

readable-web-to-node-stream@^3.0.0:
version "3.0.3"
resolved "https://registry.yarnpkg.com/readable-web-to-node-stream/-/readable-web-to-node-stream-3.0.3.tgz#e8c1458c96cec358fcc5d8c0a8894c1df30932d0"
integrity sha512-In3boYjBnbGVrLuuRu/Ath/H6h1jgk30nAsk/71tCare1dTVoe1oMBGRn5LGf0n3c1BcHwwAqpraxX4AUAP5KA==
version "3.0.4"
resolved "https://registry.yarnpkg.com/readable-web-to-node-stream/-/readable-web-to-node-stream-3.0.4.tgz#392ba37707af5bf62d725c36c1b5d6ef4119eefc"
integrity sha512-9nX56alTf5bwXQ3ZDipHJhusu9NTQJ/CVPtb/XHAJCXihZeitfJvIRS4GqQ/mfIoOE3IelHMrpayVrosdHBuLw==
dependencies:
process "^0.11.10"
readable-stream "^4.7.0"

readdirp@~3.6.0:
Expand Down Expand Up @@ -14009,11 +14028,6 @@ string.prototype.matchall@^4.0.12:
set-function-name "^2.0.2"
side-channel "^1.1.0"

string.prototype.repeat@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/string.prototype.repeat/-/string.prototype.repeat-0.2.0.tgz#aba36de08dcee6a5a337d49b2ea1da1b28fc0ecf"
integrity sha512-1BH+X+1hSthZFW+X+JaUkjkkUPwIlLEMJBLANN3hOob3RhEk5snLWNECDnYbgn/m5c5JV7Ersu1Yubaf+05cIA==

string.prototype.repeat@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/string.prototype.repeat/-/string.prototype.repeat-1.0.0.tgz#e90872ee0308b29435aa26275f6e1b762daee01a"
Expand Down

0 comments on commit 33ff29c

Please sign in to comment.