Closed martio closed 1 week ago
Duplicate of ~https://github.com/webonyx/graphql-php/issues/1626~ https://github.com/nuwave/lighthouse/issues/2629, it is more appropriate there.
@spawnia I think you provided the wrong link to the duplicate... 😉
@spawnia I have posted a solution in this issue: https://github.com/nuwave/lighthouse/issues/2629
Description: When querying an enum in the Lighthouse GraphQL API, the enum values are returned with only the first letter capitalized, which does not align with the expected uppercase format. For instance, when querying the UserStatus enum, values are returned as "Active", "Inactive", etc., instead of "ACTIVE", "INACTIVE", etc.
Expected Behavior: The enum values should be returned in uppercase, matching the convention in GraphQL specifications and our application requirements.
Steps to Reproduce:
Define a native PHP enum with lowercase values, as follows:
Configure the enum in Lighthouse:
Execute a GraphQL query that retrieves this enum:
Observe the format of the returned enum value.
Current Response:
Expected Response: