Making outgoing GraphQL calls from flows
This guide explains how to call external GraphQL APIs via HTTP with a qibb flow using the function node and an external module.
This guide is based on the basics explained in Making outgoing HTTP calls from flows
For details on how to configure external modules in a function node, please refer to How to use external modules in a function node.
The given code snippets are expecting the user to have secrets configured in Space Secrets (See Managing secrets in your space and accessing them from your flows ).
Using the function node and to make GraphQL requests
Below you can find a code snippet for a function node that integrates with a GraphQL Endpoint. This example will consume the GraphqQL API of a third-party service, which is monday.com to call it’s Version endpoint. As a prerequisite, according function nodes should have the node-fetch
module (https://www.npmjs.com/package/node-fetch ) installed and imported as fetch
.

A function node will be used to make outgoing GraphQL requests

Module in “Setup” tab of function node
In addition, the function node is expecting to have the following secrets stored in Space Secrets:
MONDAY_API_TOKEN
Function Node Code Example for “GraphQL Call”
Function | Code |
---|---|
“On Start” Tab | No code required here |
“On Message” Tab Constructs the GraphQL query and sends a POST request. Passes the response on msg.payload. |
JS
|