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. #28386

Closed
wants to merge 81 commits into from

Conversation

olisteadman
Copy link
Contributor

@olisteadman olisteadman commented Nov 30, 2020

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

KyleAMathews and others added 30 commits November 18, 2020 16:24
…28166)

* feat(gatsby): enable all dev improvements with one env var

* Address feedback

* fix
* fix(gatsby): get-page-data should timeout gracefully

* lower timeout interval, add retries, make timeout configurable, add more tests

* Update packages/gatsby/src/utils/__tests__/get-page-data.ts

Co-authored-by: Vladimir Razuvaev <[email protected]>

Co-authored-by: Michal Piechowiak <[email protected]>
…8186)

* fix(gatsby): pull out a few bug fixes from gatsbyjs#28149

* Add missing fix
* docs: release notes for v2.27 (WIP)

* Add writeup of SSR in development

* add lazy dev bundling

* Update index.md

* Add review sugestions

* added notes, restructured a bit

* Add mention of GATSBY_EXPERIMENTAL_FAST_DEV

* lint, cleanup

* cleanup

* Update docs/reference/release-notes/v2.27/index.md

Co-authored-by: Matt Kane <[email protected]>

* Update docs/reference/release-notes/v2.27/index.md

Co-authored-by: Lennart <[email protected]>

* Update docs/reference/release-notes/v2.27/index.md

Co-authored-by: Lennart <[email protected]>

* Update docs/reference/release-notes/v2.27/index.md

Co-authored-by: Lennart <[email protected]>

* Update docs/reference/release-notes/v2.27/index.md

Co-authored-by: Lennart <[email protected]>

* Update docs/reference/release-notes/v2.27/index.md

Co-authored-by: Lennart <[email protected]>

* fix headers

Co-authored-by: Kyle Mathews <[email protected]>
Co-authored-by: Matt Kane <[email protected]>
Co-authored-by: Lennart <[email protected]>
* Initial update before page styling

* Add styling

* more tweaks toward design

Co-authored-by: Kyle Gill <[email protected]>
Co-authored-by: Matt Kane <[email protected]>
* feat(gatsby): make dev ssr bundling lazy

* fix tests

* fix race condition

* typescript 😅

* await getPageData to ensure it's been created before SSRing

* instance isn't set in SSR

* Fix a few more instances of this env var

* Avoid setting anything for experimental features

Co-authored-by: Michal Piechowiak <[email protected]>
* Fix starter publish script

* Don't use yarn import because @arcanis says it's a bad idea
gatsbyjs#28238 (comment)
Currently it's "Gatsby plugin which parses files within a directory for further parsing by other plugins" which is rather opaque and CS-y.

This PR changes it to better describe how someone would actually use it — "build websites with data from your local filesystem"
ascorbic and others added 24 commits November 27, 2020 08:01
…8291)

- previously just passing the error object would produce a joi
  error

```
Failed to validate error Error [ValidationError]: "name" is not allowed
    at Object.exports.process (/myproject/node_modules/@hapi/joi/lib/errors.js:202:19)
    at internals.Object._validateWithOptions (/myproject/node_modules/@hapi/joi/lib/types/any/index.js:763:31)
    at internals.Object.validate (/myproject/node_modules/@hapi/joi/lib/types/any/index.js:797:21)
    at constructError (/myproject/node_modules/gatsby-cli/lib/structured-errors/construct-error.js:52:32)
    at Reporter.error (/myproject/node_modules/gatsby-cli/lib/reporter/reporter.js:135:59)
    at Reporter.panic (/myproject/node_modules/gatsby-cli/lib/reporter/reporter.js:75:34)
    at Object.panic (/myproject/node_modules/gatsby/src/utils/api-runner-node.js:201:16)
    at /myproject/node_modules/gatsby-plugin-sharp/index.js:162:14 {
  isJoi: true,
```
)

* chore(gatsby): Invite more people to try QUERY_ON_DEMAND

* update message for flags
…& suggest fixes to potential typos (gatsbyjs#28326)

* feature(gatsby): Warn when there's unknown flags in gatsby-config.js & suggest fixes to potential typos

* Update packages/gatsby/src/utils/handle-flags.ts

Co-authored-by: Michal Piechowiak <[email protected]>

* Reformat message per @pieh's suggestion

* make typescript happy

Co-authored-by: Michal Piechowiak <[email protected]>
…yjs#28344)

Current link of the `pluginOptionsSchema.js` redirects to a non-existent (404) page on at https://www.gatsbyjs.com/plugins/gatsby-plugin-manifest/#plugin-options-validation.
This commit fixes and points it to the actual file on the repository.
The `gatsby new` behavior wasn't actually shipped in that release!
* add first wip implementation of login command

* add logout and whoami commands

* update urls

* wrap commands in experimental flag
…er flags (gatsbyjs#28338)

* feat(gatsby): people who are using a flag, invite them to try out other flags

* Avoid scaling problems
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 Nov 30, 2020
@olisteadman olisteadman changed the title Tell user to supply BOTH keys in .env.development. Tell user to supply BOTH keys in .env.development for Gatsby E-commerce Tutorial. Nov 30, 2020
@pvdz
Copy link
Contributor

pvdz commented Dec 1, 2020

Please create a new PR with just your changes :)
image

@pvdz pvdz closed this Dec 1, 2020
@pvdz pvdz removed the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Dec 1, 2020
@olisteadman
Copy link
Contributor Author

@pvdz thanks for taking the time to request that, sorry for getting it wrong. Re-submitted as #28405

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.