import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
prepr_graphql: {
type: "app",
app: "prepr_graphql",
}
},
async run({steps, $}) {
const data = {
"query": `query {
Posts {
items {
_id
title
}
}
}`,
}
return await axios($, {
method: "post",
url: `https://graphql.prepr.io/${this.prepr_graphql.$auth.access_token}`,
data,
})
},
})
Prepr (GraphQL) uses API keys for authentication. When you connect your Prepr (GraphQL) account, Pipedream securely stores the keys so you can easily authenticate to Prepr (GraphQL) APIs in both code and no-code steps.