Skip to content

Conversation

leebyron
Copy link
Contributor

Previously we just coerce these values to the expected types, record them and carry on. However that is not safe and results in TypeInfo potentially returning invalid types when traversing an invalid query.

This instead checks the type before inserting it, upholding type safety.

There was one validator which was taking advantage of the unsafe behavior, so I re-wrote it slightly to be type safe.

Previously we just coerce these values to the expected types, record them and carry on. However that is not safe and results in TypeInfo potentially returning invalid types when traversing an invalid query.

This instead checks the type before inserting it, upholding type safety.

There was one validator which was taking advantage of the unsafe behavior, so I re-wrote it slightly to be type safe.
@leebyron leebyron merged commit bd15d53 into master Jan 27, 2017
@leebyron leebyron deleted the type-info-safe branch January 27, 2017 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants