graphene-django icon indicating copy to clipboard operation
graphene-django copied to clipboard

The 'variables' alias has been deprecated. Please use 'variable_values' instead.

Open DoryZi opened this issue 3 years ago • 0 comments

Note: for support questions, please use stackoverflow. This repository's issues are reserved for feature requests and bug reports.

  • What is the current behavior?
  • Depcreation warning, variables should be changed to variable_values.
  • However when making the change the variable values are not filled, only if we provide variables to execute does it work payload = { "firstName": "Test", "lastName": "test", "email": "[email protected]", "preferredLanguage": "BG", "password": "123", "phone": "+359899930786" } with patch.object(AccountService, 'generate_user_activation_sha', return_value='encrypted_user_data_which_will_not_be_used_now') as mock_method1, \ patch.object(SendEmail, 'send_confirmation_email', return_value=True) as mock_method2: response = self.client.execute(create_loan_processor_mutation, variables=payload)

works.

payload = { "firstName": "Test", "lastName": "test", "email": "[email protected]", "preferredLanguage": "BG", "password": "123", "phone": "+359899930786" } with patch.object(AccountService, 'generate_user_activation_sha', return_value='encrypted_user_data_which_will_not_be_used_now') as mock_method1, \ patch.object(SendEmail, 'send_confirmation_email', return_value=True) as mock_method2: response = self.client.execute(create_loan_processor_mutation, variable_values=payload) does not work.

Why ?

  • If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via a github repo, https://repl.it or similar (you can use this template as a starting point: https://repl.it/@jkimbo/Graphene-Django-Example).

  • What is the expected behavior?

  • variables_values should work

  • What is the motivation / use case for changing the behavior?

  • Please tell us about your environment:

    • Version:
    • Platform:
  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow)

DoryZi avatar Apr 30 '21 13:04 DoryZi