Skip to content

Add tools command#38

Merged
zth merged 5 commits intomainfrom
add-tools-command
Mar 18, 2026
Merged

Add tools command#38
zth merged 5 commits intomainfrom
add-tools-command

Conversation

@zth
Copy link
Owner

@zth zth commented Mar 18, 2026

No description provided.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +75 to +77
Hover.findGqlType
(typename |> GenerateSchemaUtils.uncapitalizeFirstChar)
~schemaState

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Comment on lines +125 to +127
| Some {resolverStyle = Property _; loc; fileUri} ->
Ok
(make_definition ~path:definitionHint ~kind:"exposedField" ~fileUri

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@zth zth merged commit 1348b73 into main Mar 18, 2026
5 checks passed
@zth zth deleted the add-tools-command branch March 18, 2026 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant