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

BREAKING/BUGFIX Strict coercion of scalar types #1382

Merged
merged 2 commits into from
Jun 12, 2018
Merged

Commits on Jun 11, 2018

  1. BREAKING/BUGFIX Strict coercion of scalar types

    This no longer accepts incoming variable values in a potentially lossy way, mirroring the existing behavior for literals. This fixes an issue with GraphQL.js being not spec compliant.
    
    This is breaking since servers which used to accept incorrect variable values will now return errors to clients.
    
    Serialization of values is not affected in the same way, since this is not a client-visible behavior.
    
    As a bonus, this adds unique serialization and coercion functions for the ID type, allowing to be more restrictive on numeric types and un-stringable object types, while directly supporting valueOf() methods (ala MongoDB). The changes to how the ID type serializes and coerces data could be potentially breaking.
    
    Fixes #1324
    leebyron committed Jun 11, 2018
    Configuration menu
    Copy the full SHA
    56ac106 View commit details
    Browse the repository at this point in the history

Commits on Jun 12, 2018

  1. Updates from review. Simplified ID serialization and added similar lo…

    …gic to string serialization
    leebyron committed Jun 12, 2018
    Configuration menu
    Copy the full SHA
    934d461 View commit details
    Browse the repository at this point in the history