I’ve read (1] and the various links this blog post contains (specifically [2]). Unfortunately, my testings failed which certainly comes from me being very new to GraphQL in general.
In FreePBX GraphQL Explorer tab, I first entered “gql” in Scope field (a non-empty Scope is required). Then I clicked over Reload Explorer button then the Right Arrow button above the simple “{ allModules { modules { name version } } }” content (ignoring indentation).
After doing this, I can read an error message in the right hand side: "Cannot query “allModules” on type “Query”.
I’m planning to later use a Python script (using gql package) to query FreePBX data.
What shall I change to get a first successful GraphQL query ?
Is there a doc describing headers to include in requests built with gql ?
May I add that, when using GrapQL Explorer, after entering “gql” in Scope field and clicking over Reload Explorer button, I’ve got some messages in red in right-side pane (see attachment file).
This doesn’t exactly reply to my previous question but after
enabling HTTPS support in FreePBX with default autosigned cert
disabling cert verification in my script
I could get some response to my first GraphQL requests.
What still troubles me is that the example Query you can find all over the Internet does not work on my system (beside that GraphQL Explorer also output error/warning messages).
My question is very simple. On your FreePBX 17 instance, do you have success using the bellow example ?
I would be careful expecting every output from ChatGPT to just work, especially on more obscure API surfaces. At the very least, look through the documentation: