Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Payment instructions are not returned from FE API #2519

Open
grossmannmartin opened this issue Nov 30, 2022 · 1 comment
Open

Payment instructions are not returned from FE API #2519

grossmannmartin opened this issue Nov 30, 2022 · 1 comment

Comments

@grossmannmartin
Copy link
Member

Describe the bug

Payment instructions set in admin are not returned from FE API with Payments query (or any other query returning payment).

To Reproduce

  1. In administration fill in instructions for payment
  2. Run graphql query for payments
{
  payments {
    name
    instruction
  }
}

  1. See payments are null

Expected behavior

Payments are returned properly

Additional context

It seems like the field in graphql type is named in singular (instruction), while getter in the payment class is in plural (getInstructions()).
Renaming the field in graphql type should help, but it will be a BC break. It's possible to introduce a resolverMap for instruction field, or add new getter to payment (getInstruction())

@vitek-rostislav
Copy link
Contributor

vitek-rostislav commented Nov 30, 2022

Btw, there is a test that is giving us a false sense of security now - see https://github.com/shopsys/shopsys/blob/master/project-base/tests/FrontendApiBundle/Functional/Payment/PaymentsTest.php#L50 - it asserts the instruction is null while in data fixtures, there is a text that should be actually asserted - https://github.com/shopsys/shopsys/blob/master/project-base/src/DataFixtures/Demo/PaymentDataFixture.php#L71. The current test will fail when the problem described above is fixed 🙂

@pk16011990 pk16011990 modified the milestone: On hold Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants