Skip to content

Use optional for nullable input object resolver arguments - #364

Draft
Bill Avery (wravery) with Copilot wants to merge 147 commits into
mainfrom
copilot/fix-error-compiling-resolve-function
Draft

Bill Avery (wravery) with Copilot wants to merge 147 commits into
mainfrom
copilot/fix-error-compiling-resolve-function

Conversation

Copilot AI commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Nullable input objects could produce mismatched resolver signatures and conversions, particularly for fields returning built-in scalars. Generated code declared std::optional<T> but passed std::unique_ptr<T>, causing compilation failures.

  • Argument classification

    • Classify field arguments before handling built-in return types.
  • Type generation

    • Use std::optional<T> consistently for nullable input-object resolver arguments.
    • Preserve std::unique_ptr<T> for recursive input-object members.
getField0(FieldParams&&, std::optional<Type>&&);
getField1(FieldParams&&, std::optional<Type>&&);
  • Regression coverage
    • Cover nullable input objects on both scalar- and object-returning fields.

Bill Avery (wravery) and others added 30 commits September 10, 2024 13:29
Groundwork in CMake, build workflows, and header include cleanup
Co-authored-by: wravery <6502881+wravery@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix error compiling in resolve function Use optional for nullable input object resolver arguments Sep 15, 2026
Copilot AI and others added 2 commits September 15, 2026 21:37