v1.37.2
Fix bind() for nullable GraphQLite input fields
Fix Model::bind() to correctly handle unset nullable fields when using GraphQLite 8.3 input types.
Root cause
GraphQLite automatically adds defaultValue = null in the GraphQL schema for nullable properties (?int, ?string). When a field is not provided in a mutation, graphql-php applies this default, so the Input object property is set to null — indistinguishable from an explicitly provided null via get_object_vars.
Fix
bind() now uses ReflectionObject to inspect property types:
- Old style (
public ?int $field) —nullis treated as "not provided" and skipped (ReflectionNamedType) - New style (
public int|null|Undefined $field = Undefined::VALUE) —nullis an explicit value and is applied;Undefined::VALUEis skipped (ReflectionUnionType)