menu
Channels
Team

auth with hasura and stripe test data

June 17, 2020 at 12:54am

auth with hasura and stripe test data

June 17, 2020 at 12:54am
Hi guys! Thanks for such an awesome product!
Two quick questions:
  1. I'm using OneGraph as a remote schema into Hasura. What authentication do I need, if any?
  2. Does OneGraph support Stripe test data?

June 25, 2020 at 4:54pm
I'd also like to know if OneGraph supports Stripe test data.
  • reply
  • like

June 25, 2020 at 10:55pm
I spoke to and he mentioned that you can use Stripe test data within OneGraph. You just can't use the stripe authentication directly via OneGraph. You need to use the stripe auths field and provide your test token. Example:
query MyQuery(
$stripeOAuthToken: String = "sk_test_TOKEN"
) {
stripe(auths: { stripeOAuthToken: $stripeOAuthToken }) {
customers(first: 10) {
nodes {
email
}
}
}
}
Edited
  • reply
  • like
Yup, that should do it! That said, you probably don't want to set a default: $stripeOAuthToken: String = "sk_test_TOKEN" you want: $stripeOAuthToken: String! and you're good to go!
like-fill
1
  • reply
  • like