def METHOD_NAME(graphql_client):
    request = graphql_client.request
    with pytest.raises(LegacyFormSubmissionError, match="No GraphQL query found"):
        get_legacy_form_submission(request)
    request.POST = qdict({"graphql": ["boop"]})
    with pytest.raises(LegacyFormSubmissionError, match="Invalid GraphQL query"):
        get_legacy_form_submission(request)
    request.POST = qdict(
        {
            "graphql": [
                """
        mutation Foo($input: NonExistentInput!) { foo(input: $input) }
    """
            ]
        }
    )
    with pytest.raises(LegacyFormSubmissionError, match="Invalid GraphQL input type"):
        get_legacy_form_submission(request)