-
Notifications
You must be signed in to change notification settings - Fork 224
feat(graphiql): integrate console with app server #6585
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
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Coverage report
Test suite run success3447 tests passing in 1401 suites. Report generated by 🧪jest coverage report action from 8dc20f9 |
0c3ce5a to
ada77f5
Compare
0328b01 to
8dc20f9
Compare
ada77f5 to
0de0e5b
Compare
8dc20f9 to
d2ee648
Compare
0de0e5b to
dfabb65
Compare
d2ee648 to
a20ec99
Compare
dfabb65 to
af92c30
Compare
af92c30 to
de0599e
Compare
a20ec99 to
9b31961
Compare
de0599e to
e5b4e41
Compare
9b31961 to
381c5ff
Compare
e5b4e41 to
ffeaf36
Compare
381c5ff to
59d489a
Compare
ffeaf36 to
2fed8fb
Compare
59d489a to
e9873a7
Compare
2fed8fb to
286d74c
Compare
66fe31d to
94990cf
Compare
286d74c to
48047fb
Compare
ad526cd to
852c655
Compare
16851d0 to
530b9a5
Compare
Updates the app server to serve the new GraphiQL console with secure config injection. Removes old template-based implementation. Server changes: - Serve built React app from packages/app/assets/graphiql - Inject runtime config with Unicode escaping for XSS prevention - Use \u003c, \u003e, \u0026 to prevent script tag breakout - Support query parameter passing Cleanup: - Remove old template implementation (365 lines) - Remove old CSS styles (58 lines) Server integration complete with security built-in
530b9a5 to
8708c64
Compare
852c655 to
3e7dadf
Compare
|
This PR seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action. |

WHY are these changes introduced?
This is the final PR in the 8-PR stack that completes the GraphiQL migration by integrating the new React 18 console with the app server.
Context: All previous PRs built the standalone React console. Now we need to:
This completes the migration from template-based GraphiQL to a modern React 18 standalone package.
WHAT is this pull request doing?
This PR updates the Express server to serve the new GraphiQL console and removes the old template implementation.
Key Changes:
1. Server Integration (
packages/app/src/cli/services/dev/graphiql/server.ts):Serve Built React App:
Secure Config Injection:
Why Unicode Escapes?
<,>) would break JavaScript parsing\u003c) are decoded correctly by JavaScriptvalidateConfig(PR feat(graphiql): add shared types, constants, and validation #6579) for defense-in-depthAttack Prevention Example:
Query Parameter Support:
2. New Server Endpoints:
/graphiql/ping(GET):useServerStatushook for health checks/graphiql/status(GET):{status: 'OK', storeFqdn, appName, appUrl}useServerStatushook for app status3. Cleanup - Remove Old Template Implementation:
graphiql.tsxtemplate (365 lines)style.css(58 lines)4. Build Integration:
5. .gitignore Update:
Files Modified:
packages/app/src/cli/services/dev/graphiql/server.ts- Server integration (57 additions, 34 deletions)packages/app/project.json- Build dependency.gitignore- Ignore built assetsFiles Deleted:
packages/app/src/cli/services/dev/graphiql/templates/graphiql.tsx- Old template (365 lines)packages/app/assets/graphiql/style.css- Old styles (58 lines)Dependencies
Builds on ALL 7 previous PRs:
Result: 🎉 Migration Complete! The GraphiQL console is now a standalone React 18 package integrated with the app server.
How to test your changes?
Build and Run:
Verify Functionality:
Test Server Health Monitoring:
Ctrl+C)Test Config Injection:
Open browser DevTools console:
Test Query Parameter:
Security Verification:
Verify config escaping in page source (View Page Source):
\u003cand\u003einstead of<and>Measuring impact
Post-release steps
None - this is a drop-in replacement for the existing GraphiQL implementation.
Checklist
Migration Summary
This stack successfully migrates GraphiQL from template-based implementation to a modern React 18 standalone package:
Before:
After:
Security Improvements:
Developer Experience: