Gridsome Source for Stripe
Source plugin for fetching data from Stripe into Gridsome.
Install
npm install --save gridsome-source-stripe
How to use
// In your gridsome.config.jsplugins: use: 'gridsome-source-stripe' options: objectTypes: product: expand: 'data.skus' plans: </* query options for plans */> secretKey: 'xxxxxxxxx' // optional params stripeOptions: {} downloadFiles: true imageDirectory: 'stripe_images' ;
if downloadFiles is true
the plugin will download all assets associated to fields image
and images
into imageDirectory
.
How to query and filter
For example, you can query the product nodes created from Stripe with the following:
query products allStripeProduct edges node id name
and you can filter specific node using this:
query { { id name }}
Sponsor
This plugin has been developed with the kind support of Fullstack Rocket