Skip to content

Conversation

@NeedleInAJayStack
Copy link
Member

@NeedleInAJayStack NeedleInAJayStack commented Oct 24, 2024

This is because MapCoder round-trips of Bools result in Number types. This is hard to avoid since it gets put into an NSObject container and there is no NSBool type.

Note that query validation will still disallow directly passing numeric values into boolean arguments as tested here:

Instead this simply allows numeric Swift map objects to be interpreted as GraphQLBool types.

Fixes #155

This is because MapCoder round-trips of Bools result in Number types. This is hard to avoid since it gets put into an NSObject container and there is no NSBool type.
@NeedleInAJayStack NeedleInAJayStack self-assigned this Oct 24, 2024
@NeedleInAJayStack NeedleInAJayStack changed the title fix: Allows numeric values to be parsed as Bools Allows numeric maps to be parsed as GraphQLBools Oct 24, 2024
@NeedleInAJayStack NeedleInAJayStack changed the title Allows numeric maps to be parsed as GraphQLBools Allows numeric values to be parsed as GraphQLBools Oct 24, 2024
@NeedleInAJayStack NeedleInAJayStack merged commit ec809df into GraphQLSwift:main Oct 24, 2024
6 checks passed
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.

Query with default values does not work

2 participants