Skip to content

mstn/apollo-link-swagger-stripe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GraphQL client demo for Stripe API.

  • We use official Swagger 2.0 spec of Stripe API with some minor changes. We removed some array fields since swagger-to-graphql does not process them correctly.
  • We build a GraphQL client using apollo-link-swagger.
  • The apollo link is used by GraphiQL to introspect the schema and process GraphQL queries.

To run the demo

We are able to browser "Stripe" GraphQL documentation and queries are formed correctly. However, the response will be always 401 error since the API key is missing.

You should not share API keys on the client side. There are at least two possible solutions:

  • Use apollo-link-swagger on the server.
  • Modify swagger schema to point to a proxy server that forwards requests to Stripe API with auth tokens.

This project was bootstrapped with Create React App.

Releases

No releases published

Packages

No packages published