Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tell user to supply BOTH keys in .env.development for Gatsby E-commerce Tutorial. #28405

Merged
merged 1 commit into from
Dec 3, 2020

Conversation

olisteadman
Copy link
Contributor

Description

Gatsby E-commerce Tutorial codeblock Add the Stripe source plugin indicates config should include STRIPE_SECRET_KEY but does not mention STRIPE_PUBLISHABLE_KEY.

For users supplying only the STRIPE_SECRET_KEY (without also adding STRIPE_PUBLISHABLE_KEY), gatsby-source-stripe fails to load allStripePrice as a field to be tested in GraphiQL; a browser pointed at http://localhost:8000 responds with:
Error: There was an error in your GraphQL query: Cannot query field "allStripePrice" on type "Query". Did you mean "allSitePage"?

With this one-liner we can avoid newcomers being put off by an ambiguous instruction being given in tutorial codeblocks.

Related Issues

Fixes #28385

For users supplying *only* the STRIPE_SECRET_KEY (without also adding STRIPE_PUBLISHABLE_KEY), `gatsby-source-stripe` fails to load `allStripePrice` as a field to be tested in GraphiQL; a browser pointed at http://localhost:8000 responds with:
Error: There was an error in your GraphQL query: Cannot query field "allStripePrice" on type "Query". Did you mean "allSitePage"?

With this one-liner we can avoid newcomers being put off by an ambiguous instruction being given in tutorial codeblocks.
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Dec 1, 2020
@olisteadman olisteadman changed the title Tell user to supply BOTH keys in .env.development for Gatsby E-commerce Tutorial. #28386 Tell user to supply BOTH keys in .env.development for Gatsby E-commerce Tutorial. Dec 1, 2020
@LekoArts LekoArts added type: documentation An issue or pull request for improving or updating Gatsby's documentation and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Dec 1, 2020
Copy link
Contributor

@pvdz pvdz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! 💜

@pvdz pvdz merged commit 3f2a49e into gatsbyjs:master Dec 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: documentation An issue or pull request for improving or updating Gatsby's documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gatsby E-commerce Tutorial should say to include STRIPE_PUBLISHABLE_KEY
3 participants