-
Notifications
You must be signed in to change notification settings - Fork 212
feat(graphiql): add shared types, constants, and validation #6579
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
Draft
amcaplan
wants to merge
1
commit into
11-06-feat_graphiql_add_graphiql-console_package_foundation
Choose a base branch
from
11-06-feat_graphiql_add_shared_types_constants_and_validation
base: 11-06-feat_graphiql_add_graphiql-console_package_foundation
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+499
−0
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
Author
|
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. |
This was referenced Nov 6, 2025
Contributor
Coverage report
Test suite run success3385 tests passing in 1385 suites. Report generated by 🧪jest coverage report action from 9296984 |
0093e1f to
7bb8bbe
Compare
b3a1ffc to
b199d75
Compare
7bb8bbe to
6ad1b53
Compare
b199d75 to
f14423d
Compare
f14423d to
2fd515e
Compare
6ad1b53 to
b3d377e
Compare
2fd515e to
8c2c496
Compare
b3d377e to
16966e2
Compare
d5b6f9a to
3274ef0
Compare
16966e2 to
732bdea
Compare
Adds type definitions, configuration validation with XSS prevention, and default GraphQL query constants. - Add GraphiQL config type definitions - Add default welcome message and shop query constants - Add config validation with security checks (313 lines of tests) - Prevent XSS attacks through URL validation and string sanitization All validation tests pass
732bdea to
705da8c
Compare
3274ef0 to
9296984
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

WHY are these changes introduced?
This PR builds on the foundation from PR #6578 by establishing the core type system, configuration validation, and default content for the GraphiQL console. This is the second PR in the 8-PR migration stack.
Context: The GraphiQL console will receive configuration from the Rails server via
window.__GRAPHIQL_CONFIG__. This configuration includes URLs, API endpoints, and user data. We need:WHAT is this pull request doing?
This PR adds the type definitions, security validation layer, and default content that will be used throughout the GraphiQL application.
Key Changes:
1. Type Definitions (
src/types/config.ts):GraphiQLConfiginterface defining all configuration fieldsapiVersion,apiVersions,appName,appUrl,storeFqdnbaseUrlquery,variables,defaultQuerieswindow.__GRAPHIQL_CONFIG__2. Security Validation (
src/utils/configValidation.ts):*.myshopify.comdomainsSecurity Patterns Blocked:
3. Default Content (
src/constants/defaultContent.ts):Files Added:
src/types/config.ts- TypeScript interfacessrc/constants/defaultContent.ts- Welcome message and default querysrc/utils/configValidation.ts- Security validation (153 lines)src/utils/configValidation.test.ts- Security tests (313 lines)Dependencies
Builds on: PR #6578 (package foundation)
How to test your changes?
Measuring impact
Checklist