import { graphQLClient, gql } from '@afosto/graphql-client';
export default defineComponent({
props: {
afosto: {
type: "app",
app: "afosto",
}
},
async run({steps, $}) {
graphQLClient.setAuthorizationHeader(this.afosto.$auth.auth_token);
const query = gql`query GetChannelData { channel { name type logo locale favicon business { name messaging { sender { name address } } } branding { colors { primary text } style } links { type value } } }`;
return await graphQLClient.request(query);
},
})
Afosto uses API keys for authentication. When you connect your Afosto account, Pipedream securely stores the keys so you can easily authenticate to Afosto APIs in both code and no-code steps.