graphql-laravel icon indicating copy to clipboard operation
graphql-laravel copied to clipboard

Fix: Initialize originalInput in OperationParams

Open tallesborges opened this issue 6 months ago • 4 comments

Summary

  • Added initialization of $originalInput property in the init method of OperationParams class.
  • This fix addresses the issue: "Typed property GraphQL\Server\OperationParams::$originalInput must not be accessed before initialization".
  • The change ensures that $originalInput is properly set from the BaseOperationParams object during initialization.
  • This prevents potential errors when accessing $originalInput and maintains consistency with other properties initialized in the init method.

Type of change:

  • [X] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] This change requires a documentation update
  • [ ] Misc. change (internal, infrastructure, maintenance, etc.)

Checklist:

  • [X] Existing tests have been adapted and/or new tests have been added
  • [ ] Add a CHANGELOG.md entry
  • [ ] Update the README.md
  • [X] Code style has been fixed via composer fix-style

tallesborges avatar Aug 09 '24 17:08 tallesborges