Conversation
iamfj
marked this pull request as ready for review
July 2, 2026 11:36
Map Linear's custom scalars (DateTime, Duration, UUID, JSON, etc.) to concrete TypeScript types and default unmapped scalars to `unknown`, eliminating the codegen `any` default. Widen the initiative date-range helper to accept the resulting nullable comparator types. Refs #199
✅ knip — no dead codeNo unused files, exports, types, or dependencies detected. |
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.
What does this PR do?
Configures GraphQL codegen to map Linear's custom scalars (DateTime, Duration, UUID, JSON, JSONObject, TimelessDate, etc.) to concrete TypeScript types and sets
defaultScalarType: "unknown"so any unmapped scalar falls back tounknowninstead of the codegen defaultany. The initiative date-range helper is widened to accept the resulting nullable comparator types (string | null).Closes #199
Type of change
Checklist
npm run check:cipasses (lint + format)npx tsc --noEmitpasses (type check)npm testpasses (unit tests)Testing
Ran
npm run generateand confirmed the generatedsrc/gql/graphql.tsScalarsblock now maps every reachable custom scalar with noanytypes. Verifiednpx tsc --noEmit(exit 0),npm run check:ci, andnpm test(769 tests pass).Notes for reviewers
This is a type-level change only — no runtime behavior changes.
src/gql/is git-ignored and regenerated at build time, so no generated files appear in the diff. Theentity.tschange is a required consequence: the comparator types are nowInputMaybe<...>(string | null) rather thanany, so the helper signature was widened to match.