Fixes the "Unexpected parameter: []" error by ensuring empty GraphQL variables are sent as {}
instead of []
.
- Modified the
query()
method to cast empty$variables
arrays tostdClass
objects. - Retains support for associative arrays when variables are provided.
Variables Handling:** Empty variables are now serialized as {}
(JSON object) instead of []
(array) to comply with DatoCMS API requirements.