Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Type safety for TypeInfo. #698

Merged
merged 1 commit into from Jan 27, 2017
Merged

Fix: Type safety for TypeInfo. #698

merged 1 commit into from Jan 27, 2017

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.

None yet

2 participants