Migration REST to GRAPHQL. How to publish to online store and POS?

I no longer having permission errors.Still, using publishablePublishToCurrentChannel fails:

{'userErrors': [
    {'field': ['id'], 'message': 'Channel does not exist'}]}}

this is the mutation FTR:

mutation PublishToCurrentChannel($productId: ID!) {
    publishablePublishToCurrentChannel(id: $productId) {
        userErrors {
            field
            message
        }
    }
}

I’m trying an alternative. Listing the publications available and using publishablePublish operation.

mutation = """
    mutation PublishablePublish($id: ID!, $input: [PublicationInput!]!) {
        publishablePublish(id: $id, input: $input) {
            publishable {
                ... on Product {
                    id
                    title
                }
            }
            shop {
                id
                name
            }
            userErrors {
                field
                message
            }
        }
    }
"""
variables = {
    'id': 'gid://shopify/Product/9924360339751', 
    'input': [
        {'publicationId': 'gid://shopify/Publication/193971683623'}, 
        {'publicationId': 'gid://shopify/Publication/193971814695'}
    ]
}

This returns no errors but I don’t see the publishing channels added to my product either.

{'publishablePublish': {'publishable': {'id': 'gid://shopify/Product/9924360339751',
                                        'title': 'Mulberry Protection'},
                        'shop': {'id': 'gid://shopify/Shop/81568071975',
                                 'name': 'Mulberry Test Store'},
                        'userErrors': []}}

Really sad such a common pattern is this underdocumented and obtuse.

I have added a staff account without product create and edit permission and tried to execute the mutation from my graphQL app and i got the same error

  "message": "Access denied for publishablePublishToCurrentChannel field. Required access: `write_publications` access scope. Also: The user must have a permission to create and edit products.",

Then i have added product create/edit permission to my user and re-executed the query. I got response without error. When i check the product and noticed the publishing changed.

Setting → user and permission → select the user → check product create and edit permission