Skip to content

chore: upgrade graphql#3445

Merged
BlairCurrey merged 2 commits into
mainfrom
bc/graphql-up-16.11
Jun 6, 2025
Merged

chore: upgrade graphql#3445
BlairCurrey merged 2 commits into
mainfrom
bc/graphql-up-16.11

Conversation

@BlairCurrey

@BlairCurrey BlairCurrey commented Jun 3, 2025

Copy link
Copy Markdown
Contributor

Changes proposed in this pull request

  • upgrades graphql to latest

Context

Somewhat resolves the issues encounter here where upgrading graphql in documentation causes another service to fail #3431.

This issue was auth failing to build when upgrading graphql to latest in documentation.

 > [builder 5/5] RUN pnpm --filter auth build:
10.67   Type '{ plugins: (LoggingPlugin | ApolloServerPlugin<BaseContext>)[]; introspection: boolean; validationRules: ValidationRule[]; allowBatchedHttpRequests: false; includeStacktraceInErrorResponses: false; schema: GraphQLSchema; }' is not assignable to type 'ApolloServerOptionsWithSchema<BaseContext>'.
10.67     Types of property 'validationRules' are incompatible.
10.67       Type 'import("/home/rafiki/node_modules/.pnpm/graphql@16.11.0/node_modules/graphql/validation/ValidationContext").ValidationRule[]' is not assignable to type 'import("/home/rafiki/node_modules/.pnpm/graphql@16.10.0/node_modules/graphql/validation/ValidationContext").ValidationRule[]'.
10.67         Type 'import("/home/rafiki/node_modules/.pnpm/graphql@16.11.0/node_modules/graphql/validation/ValidationContext").ValidationRule' is not assignable to type 'import("/home/rafiki/node_modules/.pnpm/graphql@16.10.0/node_modules/graphql/validation/ValidationContext").ValidationRule'.
10.67           Types of parameters 'context' and 'context' are incompatible.
10.67             Type 'import("/home/rafiki/node_modules/.pnpm/graphql@16.10.0/node_modules/graphql/validation/ValidationContext").ValidationContext' is not assignable to type 'import("/home/rafiki/node_modules/.pnpm/graphql@16.11.0/node_modules/graphql/validation/ValidationContext").ValidationContext'.
10.67               Types have separate declarations of a private property '_schema'.
10.71 /home/rafiki/packages/auth:
10.71  ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  auth@ build: `pnpm build:deps && pnpm clean && tsc --build tsconfig.json && pnpm copy-files`
10.71 Exit status 1
------
packages/auth/Dockerfile.prod:44
--------------------
  42 |         --offline \
  43 |         --frozen-lockfile
  44 | >>> RUN pnpm --filter auth build
  45 |     
  46 |     FROM node:20-alpine3.20 AS runner
--------------------
ERROR: failed to solve: process "/bin/sh -c pnpm --filter auth build" did not complete successfully: exit code: 1
Error: buildx failed with: ERROR: failed to solve: process "/bin/sh -c pnpm --filter auth build" did not complete successfully: exit code: 1

This "somewhat resolves" it because just upgrading the graphql package in documentation again could result in the same thing. We discussed pinning all the other graphql versions but I dont believe that was the issue. Even when reverting to 16.10 this still failed. Judging by the pnpm-lock for this commit the graphql-armor was using some hoisted version of 16.11.

Maybe pinning the versions would prevent this but upgrading all versions seems like a good practice anyways.

Checklist

  • Related issues linked using fixes #number
  • Tests added/updated
  • Make sure that all checks pass
  • Bruno collection updated (if necessary)
  • Documentation issue created with user-docs label (if necessary)
  • OpenAPI specs updated (if necessary)

@github-actions github-actions Bot added type: tests Testing related pkg: backend Changes in the backend package. pkg: frontend Changes in the frontend package. pkg: auth Changes in the GNAP auth package. pkg: mock-ase pkg: mock-account-service-lib labels Jun 3, 2025
@netlify

netlify Bot commented Jun 3, 2025

Copy link
Copy Markdown

Deploy Preview for brilliant-pasca-3e80ec ready!

Name Link
🔨 Latest commit 4376ce7
🔍 Latest deploy log https://app.netlify.com/projects/brilliant-pasca-3e80ec/deploys/683f1f34477eff0008dffad6
😎 Deploy Preview https://deploy-preview-3445--brilliant-pasca-3e80ec.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions

github-actions Bot commented Jun 3, 2025

Copy link
Copy Markdown

🚀 Performance Test Results

Test Configuration:

  • VUs: 4
  • Duration: 1m0s

Test Metrics:

  • Requests/s: 40.63
  • Iterations/s: 13.56
  • Failed Requests: 0.00% (0 of 2442)
📜 Logs

> performance@1.0.0 run-tests:testenv /home/runner/work/rafiki/rafiki/test/performance
> ./scripts/run-tests.sh -e test "-k" "-q" "--vus" "4" "--duration" "1m"

Cloud Nine GraphQL API is up: http://localhost:3101/graphql
Cloud Nine Wallet Address is up: http://localhost:3100/
Happy Life Bank Address is up: http://localhost:4100/
cloud-nine-wallet-test-backend already set
cloud-nine-wallet-test-auth already set
happy-life-bank-test-backend already set
happy-life-bank-test-auth already set
     data_received..................: 852 kB 14 kB/s
     data_sent......................: 1.7 MB 29 kB/s
     http_req_blocked...............: avg=6.12µs   min=2.19µs   med=5.38µs   max=217.6µs  p(90)=6.51µs   p(95)=7.1µs   
     http_req_connecting............: avg=297ns    min=0s       med=0s       max=178.13µs p(90)=0s       p(95)=0s      
     http_req_duration..............: avg=97.83ms  min=9.23ms   med=83.34ms  max=583.31ms p(90)=169.84ms p(95)=191.63ms
       { expected_response:true }...: avg=97.83ms  min=9.23ms   med=83.34ms  max=583.31ms p(90)=169.84ms p(95)=191.63ms
     http_req_failed................: 0.00%  ✓ 0         ✗ 2442
     http_req_receiving.............: avg=90.11µs  min=26.83µs  med=80.09µs  max=2.73ms   p(90)=114.3µs  p(95)=139.24µs
     http_req_sending...............: avg=36.41µs  min=10.83µs  med=28.25µs  max=1.67ms   p(90)=41.85µs  p(95)=54.57µs 
     http_req_tls_handshaking.......: avg=0s       min=0s       med=0s       max=0s       p(90)=0s       p(95)=0s      
     http_req_waiting...............: avg=97.71ms  min=9.1ms    med=83.27ms  max=583.23ms p(90)=169.72ms p(95)=191.56ms
     http_reqs......................: 2442   40.631009/s
     iteration_duration.............: avg=294.78ms min=186.54ms med=283.96ms max=1.1s     p(90)=354.47ms p(95)=402.68ms
     iterations.....................: 815    13.560308/s
     vus............................: 4      min=4       max=4 
     vus_max........................: 4      min=4       max=4 

@github-actions github-actions Bot added the pkg: documentation Changes in the documentation package. label Jun 3, 2025
"axios": "^1.8.2",
"class-variance-authority": "^0.7.1",
"graphql": "^16.8.1",
"graphql": "^16.11.0",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We talked about pining these everywhere. TBH I'm not sure if that's going to resolve it and feel like it makes it harder to keep everything up to date.

@BlairCurrey BlairCurrey requested a review from mkurapov June 3, 2025 16:33
@mkurapov

mkurapov commented Jun 3, 2025

Copy link
Copy Markdown
Contributor

Sanity check: making Admin API requests to local playground was OK?

@BlairCurrey BlairCurrey merged commit a5077c5 into main Jun 6, 2025
44 checks passed
@BlairCurrey BlairCurrey deleted the bc/graphql-up-16.11 branch June 6, 2025 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: auth Changes in the GNAP auth package. pkg: backend Changes in the backend package. pkg: documentation Changes in the documentation package. pkg: frontend Changes in the frontend package. pkg: mock-account-service-lib pkg: mock-ase type: tests Testing related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants