Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f83f87bbfd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
src/ml/Analyze.ml
Outdated
| Hover.findGqlType | ||
| (typename |> GenerateSchemaUtils.uncapitalizeFirstChar) | ||
| ~schemaState |
There was a problem hiding this comment.
Keep uppercase-backed schema IDs in type lookup
resolve_type_definition lowercases the first character before calling Hover.findGqlType, but findGqlType only retries the original capitalization for schemaState.types (src/ml/Hover.ml:12-39). Valid GraphQL types whose stored ID starts uppercase—such as module-defined scalars like Timestamp (src/ml/GenerateSchema.ml:1300-1359) and synthetic input objects like FindShopInputByAddress (src/ml/GenerateSchema.ml:878-900)—therefore fall through to None, so resgraph tools find-definition Timestamp reports that the type does not exist even though it is present in the generated schema.
Useful? React with 👍 / 👎.
src/ml/Analyze.ml
Outdated
| | Some {resolverStyle = Property _; loc; fileUri} -> | ||
| Ok | ||
| (make_definition ~path:definitionHint ~kind:"exposedField" ~fileUri |
There was a problem hiding this comment.
Avoid emitting
Location.none as a field definition
This branch returns any stored field location verbatim, but inline-object union members are created with loc = Location.none (src/ml/GenerateSchema.ml:428-445). In that schema shape, resgraph tools find-definition <SyntheticObject>.<field> will print a bogus 1:1-1:1 range in the file instead of either the real declaration site or an explicit “location unavailable” error, which makes the new command misleading for valid inputs.
Useful? React with 👍 / 👎.
No description provided.