Fix for Issue #39 Broke Optional Types in General #54
Labels
💻 aspect: code
Concerns the software code in the repository
🕹 aspect: interface
Concerns end-users' experience with the software
🛠 goal: fix
Bug fix
🟥 priority: critical
Must be fixed ASAP
released
🏁 status: ready for de
Ready for work
Original Issue Reference
Issue #39 introduced a fix to allow default values for parameters in GraphQL resolver functions. However, this fix has inadvertently broken the handling of optional parameters in general.
Problem Description
The current implementation does not support optional parameters (
foo?: string
orfoo: string | undefined
) in resolver functions due to the changes made in the fix for Issue #39. While the fix correctly handles parameters with default values, it has caused a regression for optional parameters.Examples
Required (Working):
Optional (Not Working):
Default Value (Working):
Steps to Reproduce
foo?: string
orfoo: string | undefined
).Expected Behavior
The resolver functions should handle optional parameters correctly, returning the appropriate values based on whether the parameter is provided or not.
Actual Behavior
The resolver functions fail to handle optional parameters, leading to runtime errors or incorrect behavior.
Impact
This issue prevents the use of optional parameters in resolver functions, reducing the flexibility and usability of the GraphQL API.
Additional Information
Please refer to the original issue for context: Issue #39.
The text was updated successfully, but these errors were encountered: