When trying to connect to the PantherĀ API through Python, the following error occurs:
TypeError: Must provide document.
To resolve this issue, ensure that the query being passed to client.execute
is wrapped in a gql object, like so:
client.execute(gql("My Query Here"))
This issue occurs if the query is not in the correct format. Calls to the GraphQL server must be in the following format:
"query: 'query FunctionName {rest of query here...}'"