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
…piling-resolve-function

# Conflicts:
#	cmake/version.txt
#	include/SchemaGenerator.h
#	include/SchemaLoader.h
#	include/graphqlservice/GraphQLParse.h
#	include/graphqlservice/internal/Version.h
#	res/ClientGen.rc
#	res/SchemaGen.rc
#	res/graphqlclient_version.rc
#	res/graphqljson_version.rc
#	res/graphqlpeg_version.rc
#	res/graphqlresponse_version.rc
#	res/graphqlservice_version.rc
#	src/SchemaGenerator.cpp
#	src/SyntaxTree.cpp

Co-authored-by: wravery <6502881+wravery@users.noreply.github.com>
Co-authored-by: wravery <6502881+wravery@users.noreply.github.com>
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.

Error compiling in resolve function

3 participants