How to apply the config with a graphQL query?

Hello ! I have I am confronted with a problem. It is a question of applying the configurations after modifications.

I read the previous topics and it turned out that the following request was the correct one:

    mutation {
      doreload (input: {}) {
        message
        status
        transaction_id
      }
    }

.
Except that when I send the request I get the following error:

{"errors": [{"message": "Cannot query field \" doReload \ "on type
\ "Mutation \". "," Category ":" graphql "," locations ": [{" line ": 2," column ": 3}]}]}

The server is working fine, and I have Freepbx 15 with asterisk 16

That’s a fairly new feature, what version of the API module are your using? Current is v15.0.3.12

Actually, the GraphQL API support in FreePBX is moving rapidly right now. I would actually recommend running edge for a few of the modules if you want support. Keep in mind the APIs are still subject to change as we work through issues. To install Full GraphQL support make sure you run the following daily until the API stabilizes:
fwconsole ma upgrade --edge framework api certman firewall sysadmin

1 Like

Thank you for your answers. Indeed the PBX API module was not up to date. I upgraded to version v13.0.3.13.
But it still doesn’t work


My request


The version of PBX Module API

Like I said above, you need to upgrade framework, api, certman, firewall, and sysadmin to the latest version in EDGE for them to run properly. Simply upgrading the API module to the latest stable version won’t make it work.

Execute the following command in the CLI:
fwconsole ma upgrade --edge framework api certman firewall sysadmin

1 Like

Thank you very much !
After the update via the command the market request
{"data": { "doreload": { "status": true } } }

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.