What is the correct way to call doreload via GraphQL?

Running FreePBX 16.0.21.4 with PBX API 16.0.10 (there are no updated via edge).
I’m trying to call doreload via…

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

As indicated in tutorials and documentation. However this generates an error…

"Cannot query field “doreload” on type “Mutation”

Community posts that mention this offer no resolution for PBX API 16.0.10.

Any ideas? Thanks.

Can anybody help with this?

What happens when you check if a reload is required?

https://wiki.freepbx.org/display/FPG/Framework+Module+GraphQL+APIs#FrameworkModuleGraphQLAPIs-Checkifreloadrequired

That doesn’t work either…

message: “Cannot query field “fetchNeedReload” on type “Query”.”
status: false

Has nobody got any suggestions for this issue?

This is either going to be really simple of really complicated. Any ideas?

Having had my wrist firmly smacked for being rude enough to PM someone about this, I’ll start to dig into the code to see what is happening.

First observation is that the docs say “doreload” is part of the framework module and that API code for a module is in the “admin/modules/Api” directory. However, this directory is missing on my system (FreePBX Framework 16.0.21.3).

Having noticed some discussion about this problem on FreePBX 15 and and edge upgrade being required, I upgraded FreePBX from edge giving me FreePBX Framework 16.0.21.6. However, this has not helped.

This is what we execute, I’m fairly sure it works or at least tells us its working:

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

As far as I can tell, as long as you’re running the most current modules then everything should work. It does require sysadmin 16.0.14 to run though, so make sure that’s installed as well.

I would make sure the following modules versions are installed at a minimum:
api: 16.0.10
core: 16.0.65.3
framework: 16.0.21.3
sysadmin: 16.0.14

Well that’s it then, it needs sysadmin?

Probably, system has the mechanism to execute background tasks, especially if they need root. Not that this task really needs to run as root, but it is what it is.

Also, keep in mind sysadmin is two things, a FreePBX module and a RPM. The scripts and libraries that are bundled with the RPM is actually what executes the background tasks.

Where can I find for certain that sysadmin is required even for the API method to be located?
This is a make or break thing for my client.

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