Skip to content

Suggest an input type when schemagen finds an output type as an argument - #369

Open
Darshan Ram Venkataraman Lakshminarasimhan (DashRam64) wants to merge 1 commit into
microsoft:mainfrom
DashRam64:fix-300-object-argument-error
Open

Darshan Ram Venkataraman Lakshminarasimhan (DashRam64) wants to merge 1 commit into
microsoft:mainfrom
DashRam64:fix-300-object-argument-error

Conversation

@DashRam64

Using an object, interface, or union type as a field argument or input object field failed with only "Invalid argument type: ", which doesn't say what is wrong. The error now names the kind of type and says that arguments and input fields must be a scalar, enum, or input type, so an input type should be declared instead.

Adds schemaloader_tests covering object, interface, and union arguments, an object type used as an input field, and a valid input type argument.

Fixes #300

Using an object, interface, or union type as a field argument or input
object field failed with only "Invalid argument type: <name>", which
doesn't say what is wrong. The error now names the kind of type and
says that arguments and input fields must be a scalar, enum, or input
type, so an input type should be declared instead.

Adds schemaloader_tests covering object, interface, and union arguments,
an object type used as an input field, and a valid input type argument.

Fixes microsoft#300
@DashRam64

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

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.

Suggestion: Clearer schemagen error messages

1 participant