Conversation
…management - Removed the pylon-builder package and utilized esbuild watch mode for faster builds. - Added pm2 for automatic server restarts and logging. - Introduced cross-environment client builds using gqty. - Breaking change: removed client generation feature; users should now utilize GQty CLI for client generation.
🦋 Changeset detectedLatest commit: 74ba3bf The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
🚀 Snapshot Release (
|
| Package | Version | Info |
|---|---|---|
create-pylon |
1.1.5-canary-20260508115545.74ba3bff3f7ade973010148205bb756b3e5642cc |
npm ↗︎ unpkg ↗︎ |
@getcronit/pylon |
3.0.0-canary-20260508115545.74ba3bff3f7ade973010148205bb756b3e5642cc |
npm ↗︎ unpkg ↗︎ |
@getcronit/pylon-dev |
2.0.0-canary-20260508115545.74ba3bff3f7ade973010148205bb756b3e5642cc |
npm ↗︎ unpkg ↗︎ |
This was
linked to
issues
Feb 19, 2025
…-routes plugin setup
enable source maps for client and server builds and update external dependencies
This fixes the the documentation of type fields (e.g. interfaces) in the schema parser. Previously, the return type of the property was used to determine the description of the field. If a type property used the `Date` type, the description of the `Date` type was used instead of the actual description of the field. This commit changes the behavior to use the property symbol instead of the return type of the property. closes #76
added 30 commits
March 16, 2026 17:36
…solvers Previously, `PatchSchema` aggressively unwrapped function signatures down to their awaited return types. This caused nested resolvers (e.g., `collections.nodes[0].products`) to incorrectly lose their callable signatures and argument definitions. This update: - Modifies `PatchSchema` to infer and retain original arguments (`(...args: infer Args)`), applying the schema patch exclusively to the function's return type. - Updates `NeedsMap` to safely unwrap function signatures, ensuring nested field selections (`needs`) can still be accurately mapped to the underlying return types.
…s and adjust scalar type resolution in `getType`.
Previously, `wrapResolver` failed to map data correctly when remote schemas returned fields under their alias keys instead of schema keys. Furthermore, mixing unaliased and aliased queries for the same field (e.g., `products` and `a: products`) caused the execution to eagerly resolve using the schema key, dropping the aliased data. This update modifies the complex node resolution step to scan `childNodes` for the presence of any aliases. If aliases are found, it defers to a dynamic resolver function. At execution time, this function dynamically prioritizes looking up the specific `aliasKey` from the resolved data object before falling back to the standard `schemaKey`. This ensures robust compatibility with underlying engines when delegating heavily aliased queries to remote schemas.
Previously, if a user provided a patch function in `PylonGateway` but did not explicitly spread the original `data` object in their return statement, any dynamically aliased fields returned by the remote schema were silently dropped. This caused deeply nested aliased queries to fail and return null during downstream execution. This update modifies `PylonPatchTransform` to automatically merge the original `processedData` with the `patchedData` returned by the user's patch function. This guarantees that all underlying remote data and aliases are strictly preserved for the local GraphQL engine to resolve, regardless of how the patch function is written.
- Add support for generating indexable multi-file feeds. - Support standard cache revalidation exports for caching integration. - Introduce MetadataRoute namespace to bundle nested sitemap types.
- Automatically expand relative paths into absolute URLs using the request origin.
- Replaced default `delegateToSchema` variable generation with a custom `InlineArgsTransform`.
- Arguments are now parsed from flat JavaScript objects directly into inline GraphQL AST nodes.
- This bypasses rigid remote wrapper types (like `{ input: ... }`) in the variables payload, allowing for developer-friendly, flattened local function signatures.
- Integrated a `TypeInfo` traversal pass during AST injection to automatically detect and coerce string AST nodes into `Kind.ENUM` nodes based on the remote schema. This resolves `GRAPHQL_VALIDATION_FAILED` errors when passing string representations of enums to strict remote graphs.
…d arguments, and fix scalar type checking.
- Added `Argument` and `ObjectField` visitors to `InlineArgsTransform`. - When an operation defines an optional variable that is absent from the variables payload, the visitor now returns `null` to completely strip the argument or field from the AST tree. - This prevents the remote GraphQL server from throwing undefined variable errors when encountering orphaned variable nodes (e.g., `first: $missingVar`). - Ensures seamless fallback behavior for omitted arguments while preserving full variable inlining.
- Extract and apply `statusCode` from React Router context in setup - Add 404 loaders to internal catch-all routes in build utils
was broken due to change in early return for JSON requests
…tic analysis - Migrated from the legacy prop-injected "data skeleton" model to a robust `useData` hook that enforces React Suspense for a more deterministic loading experience. - Implemented `use-data-static-analyzer` to perform deep project-wide analysis, extracting all possible GraphQL requirements—including conditional fields across the entire component tree—into automatic `prepare` blocks. - Eliminated partial render issues and manual pre-fetching by pairing static requirement extraction with Suspense, ensuring components only render when all potential data paths are fulfilled. - Replaced brittle prop-based refetching with a globally scoped `useDataRefetch` hook for targeted, operation-based cache invalidation. - Introduced `DataQueryProvider` and `useDataQuery` for scoped hydration, resolving browser-side hydration mismatches and cache collisions. - Hardened the build-time transformer with AST-based injection to robustly support merging `prepare` blocks into both literal and dynamic `useData` configurations. - Fixed circular dependency bugs and internal context duplication by migrating core state to direct internal modules.
- Enabled `splitting: true` in esbuild configuration to keep dynamic imports isolated in separate chunks. - Refactored `usePages` plugin types into a standalone `types.ts` file to prevent accidental loading of React-heavy component logic during type discovery. - Ensured `dist/index.js` remains a lightweight entry point without mandatory React runtime requirements.
…functions - Updated the static analyzer's generatePrepare logic to use optional chaining (?.) for all property accesses, array mappings, and function calls. - This hardens the injected code against runtime errors when encountering null or undefined values in intermediate data paths during initial data fetching. - Updated unit and integration tests across selectors-to-prepare.test.ts, build.test.ts, and integration.test.ts to match the new robust output format.
- Injected a <Suspense> boundary into the generated WithLoaderDataWrapper in app-utils.ts. This prevents full route remounts when useData suspends, preserving the stability of the pageClient and its cache. - Enabled pageClient.useHydrateCache in the generated client code to correctly apply SSR snapshots. - Cleaned up debug console.log statements in app-utils.ts and use-data.ts. - Adjusted the pruning logic sequence to ensure consistent component lifecycle behavior.
- Introduced StaticAnalysisManager to deduplicate ts-morph project initialization and query analysis between client and server builds. - Implemented content-based hashing and a per-session cache to bypass expensive AST parsing on unchanged files. - Added robust dependency tracking that records all accessed files during AST traversal (including child components and imports) and reports them to esbuild via watchFiles. - Updated coreAnalyze to handle recursive file access tracking and fixed existing test regressions. - Refactored the esbuild plugin to share a single manager instance across build contexts, resulting in ~50-75% faster rebuild times.
…ath alias resolution
…nt-side redirects Refactors the SSR data fetching and redirect logic to improve performance and alignment with React Router's data pipeline. - **Server-side Loaders**: Replaced the dynamic `@getcronit/pylon` import hack with React Router's `requestContext`. Loaders now receive `pagesContext` directly via the `context` parameter on the server. - **Optimized Redirect Handling**: Introduced the `X-Pylon-Redirect` header for client-side navigation requests. This allows the server to signal redirects without using HTTP 302, preventing the browser's `fetch()` from automatically following the redirect and wasting a full server round-trip. - **Native Error Handling**: Errors during GQty's `prepareReactRender` are now injected into `staticHandlerContext.errors`, allowing React Router to render the appropriate `errorElement` natively. - **Cleanup**: Consolidated redirect and error handling logic in both the server-side setup and the isomorphic loader utility.
…ehensive test suite scenarios
…er for data refetching
…ng generic identifier usage
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
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.
This pull request includes significant updates to the
@getcronit/pylonpackages, introducing major changes and new features, as well as some minor improvements and bug fixes. The most important changes include the integration of@getcronit/pylon-builderinto@getcronit/pylon-dev, enhancements to the authentication system, and improvements to the plugin system.Major Changes:
Integration of
@getcronit/pylon-builderinto@getcronit/pylon-dev:pylon-builderpackage.esbuildwatch mode for faster and more efficient development.pm2for process management, restarting the server automatically after builds, and logging withconsola.Overhaul of the authentication system:
useAuthplugin, which automatically sets up authentication routes (/auth/login,/auth/callback,/auth/logout), manages token cookies, and enhances role-based route protection.Minor Changes:
Enhancements to the plugin system:
useViewerplugin.New
usePagesplugin:Option to disable playground and introspection:
Patch Changes:
Fixes and improvements in
create-pylon:consolafor clearer interactive prompts and logs.Bug fix:
These updates improve the overall functionality, performance, and developer experience of the
@getcronit/pylonpackages.