with Prepr (GraphQL) and Ory?
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,
})
},
})
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
ory: {
type: "app",
app: "ory",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.console.ory.sh/projects`,
headers: {
Authorization: `Bearer ${this.ory.$auth.workspace_api_key}`,
"Content-Type": `application/json`,
},
})
},
})