Skip to content

Conversation

@sjwilczynski
Copy link

@sjwilczynski sjwilczynski commented Jan 29, 2026

Summary

  • Fixed MockPayloadGenerator to return all enum values for plural enum fields instead of just the first value
  • Added test to validate default enum array generation behavior with @relay_test_operation

Before: Plural enum fields like traits: [PersonalityTraits] would return ["<mock-value-for-field-\"traits\">"] (mock array, not matching the enum type)

After: Plural enum fields return all enum values: ["CHEERFUL", "DERISIVE", "HELPFUL", "SNARKY"]

Test plan

  • Added new test generate mock for enum in arrays with default values that validates plural enum fields return all enum values by default
  • Other tests still pass

@meta-cla meta-cla bot added the CLA Signed label Jan 29, 2026
@sjwilczynski sjwilczynski changed the title Fix plural enum field generation in MockPayloadGenerator fix(relay-test-utils): fix plural enum field generation in MockPayloadGenerator Jan 29, 2026
@sjwilczynski sjwilczynski changed the title fix(relay-test-utils): fix plural enum field generation in MockPayloadGenerator fix(relay-test-utils): fix plural enum field generation Jan 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant