Rodrigo
Rodrigo

Reputation: 291

GraphQLTestCase self.query query() got an unexpected keyword argument 'op_name'

I have the following GraphQLTestCase

def test_create_foo(self):
    response = self.query(
        """
        mutation createFoo($input: MutationInput!) {
            createFoo(input: $input) {
                foo {
                    id
                    title
                }
            }
        }
        """,
        op_name="createFoo",
        input_data={"title": "Title Test"},
    )

When I ran, I got the error:

response = self.query( TypeError: query() got an unexpected keyword argument 'op_name'

I am using:

What can be?

Upvotes: 1

Views: 816

Answers (1)

andreilozhkin
andreilozhkin

Reputation: 535

apparently op_name argument was renamed to operation_name in graphene-django 3.0.0, you can check other changes here https://github.com/graphql-python/graphene-django/releases/tag/v3.0.0

Upvotes: 2

Related Questions