The Federated Content Platform. Unify, structure, enrich and distribute content from anywhere to anywhere.
Go to siteimport { axios } from "@pipedream/platform"
export default defineComponent({
props: {
hygraph: {
type: "app",
app: "hygraph",
}
},
async run({steps, $}) {
const data = {
"query": `{
posts {
id
author {
id
name
}
publishedAt
}
}`,
}
return await axios($, {
method: "post",
url: `{replace_with_your_content_api_url}`,
headers: {
Authorization: `Bearer ${this.hygraph.$auth.permanent_auth_token}`,
"Content-Type": `application/json`,
},
data,
})
},
})
Hygraph uses API keys for authentication. When you connect your Hygraph account, Pipedream securely stores the keys so you can easily authenticate to Hygraph APIs in both code and no-code steps.
To connect Pipedream to your Hygraph account, create a Permanent Auth Token in your Hygraph project and paste it below.
To learn more about configuring granular permissions for your token, refer to Hygraph's developer docs.