Code Monkey home page Code Monkey logo

plugins's Introduction

Welcome to the Gatsby User Collective!

The Gatsby UC was born out of a desire to create higher quality plugins in the Gatsby ecosystem by reducing maintainer work loads.

Goals

Most Gatsby plugin projects aren't massive. Sometimes they need regular maintenance, a lot of the time they do not. Either way, original authors become unable or willing to maintain a plugin at any given moment or maybe indefinately. This is not a comdemnation, it's a fact of life that sometimes maintainers need to move on. No matter the cause, this results in plugins going un-maintained by their authors. Others are willing and able to help; but the bottle neck that cannot be bypassed. At times this means fixing bugs in less ideal ways, creating duplicate implementations of plugins, etc. The Gatsby User collective's goal is to demorcratize the maintenance of these plugins to allow more folks to assist in their maintenance.

Info

The details of this community is still being flushed out. As problems arrize we will solve them together and in an open fasion. For now check out

  • Code of conduct [TBA]
  • Submitting a plugin to the UC [TBA]
  • ...

plugins's People

Contributors

allcontributors[bot] avatar bors[bot] avatar brendanmc6 avatar dependabot[bot] avatar ethagnawl avatar gatsby-uc-bot avatar github-actions[bot] avatar h93xv2 avatar jamessimone avatar jbolda avatar jonesbp avatar klyngen avatar konsalex avatar kyleamathews avatar laurenskling avatar lekoarts avatar mabhub avatar marvinjude avatar mattcompiles avatar moonmeister avatar pieh avatar renovate-bot avatar renovate[bot] avatar rmcsharry avatar ryan-talus avatar tboutron avatar tsdexter avatar whidy avatar xsyki avatar youmustfight avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

plugins's Issues

bug(gatsby-plugin-fastify): splat redirects not working

Describe the bug

The docs on redirects are not very clear/existing. There is really only the section on Reverse Proxy (which I assume is specific to redirects with statusCode: 200) so I'm not really sure if this is a bug or intended behaviour.

Most of the redirect types from the Gatsby docs do not work. https://support.gatsbyjs.com/hc/en-us/articles/1500003051241-Working-with-Redirects-and-Rewrites

// works, redirects to: /recipes/mouthwatering-lasagna
createRedirect({
  fromPath: `/blog/recipes/mouthwatering-lasagna`,
  toPath: `/recipes/mouthwatering-lasagna`,
}) 
// works, redirects all URLs to /recipes including the exact /blog/recipes/*
createRedirect({
  fromPath: `/blog/recipes/*`,
  toPath: `/recipes`,
})
// doesn't work, redirects all paths after recipes2 to /recipes2/* (with asterisk in URL)
createRedirect({
  fromPath: `/blog/recipes2/*`,
  toPath: `/recipes2/*`,
})
// doesn't work, no redirect at all, just loads /param?id=7
createRedirect({
  fromPath: `/param?id=7`,
  toPath: `/gatsby_file.pdf`
})
// doesn't work, no redirect, loads /param?id=someid (or other param passed)
createRedirect({
  fromPath: `/param?id=:id`,
  toPath: `/param/:id`,
})

To Reproduce

Create the redirects above or clone https://github.com/tsdexter/gatsby-plugin-fastify-redirects-bug

Expected behavior

I would expect splat and param redirects to work

System Info

Please provide information about your site via these means as possible:

System:
OS: Windows 10 10.0.19044
CPU: (16) x64 11th Gen Intel(R) Core(TM) i7-11850H @ 2.50GHz
Binaries:
Node: 16.16.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.19 - C:\Program Files\nodejs\yarn.CMD
npm: 8.11.0 - C:\Program Files\nodejs\npm.CMD
Languages:
Python: 2.7.8 - /c/Python27/python
Browsers:
Edge: Spartan (44.19041.1266.0), Chromium (106.0.1370.42)
npmPackages:
gatsby: ^4.22.0 => 4.24.4
gatsby-plugin-fastify: ^0.9.4 => 0.9.4
gatsby-plugin-google-analytics: ^4.16.0 => 4.24.0
gatsby-plugin-google-tagmanager: ^4.24.0 => 4.24.0
gatsby-plugin-image: ^2.16.1 => 2.24.0
gatsby-plugin-manifest: ^4.16.0 => 4.24.0
gatsby-plugin-postcss: ^5.16.0 => 5.24.0
gatsby-plugin-react-helmet: ^5.16.0 => 5.24.0
gatsby-plugin-sharp: ^4.16.1 => 4.24.0
gatsby-plugin-sitemap: ^5.24.0 => 5.24.0
gatsby-source-filesystem: ^4.16.0 => 4.24.0
gatsby-source-wordpress: ^6.16.1 => 6.24.0
gatsby-transformer-sharp: ^4.16.0 => 4.24.0
npmGlobalPackages:
gatsby-dev-cli: 4.24.0

add[gatsby-plugin-ackee-tracker]

Info

Overview

Enables Ackee Tracker in Gatsby site.

Tasks:

Contributor Tasks:

Admin Tasks:

  • Move Code into gatsby-uc/plugins repo
    • Update Readme in old repo to redirect folks to new location
    • Archive old Repo
    • Close any irrelevant PRs/Issues
    • Move/Comment on still applicable issues
  • Update Plugin with best practices
  • Publish new version

feat(gatsby-source-strapi): Support plugin prefixes

Plugins such as i18n include their own content types such as locale that can be queried via the api as well.
Those are exposed on sub paths of the form /api/{plugin}/{pluralName}.

When trying to fetch e.g. the locale type, currently the request is made to /api/locales as it is resolved through the fetched schema but the plugin prefix is not used although it can be derived from the plugin field in the schema.

Why is this useful?
Especially in the example case with locales, it can be used to query a list of all locales and their names in order to build e.g. a language switcher component.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Pending Approval

These branches will be created by Renovate only once you click their checkbox below.

  • chore(packages): update actions/cache action to v4
  • chore(packages): update dependency cypress to v13
  • chore(packages): update dependency prettier to v3
  • chore(repo): update dependency eslint to v9
  • chore(repo): update dependency eslint-plugin-unicorn to v53
  • chore(repo): update dependency husky to v9
  • chore(repo): update typescript-eslint monorepo to v7 (major) (@typescript-eslint/eslint-plugin, @typescript-eslint/parser)
  • fix(packages): update dependency @fastify/http-proxy to v9
  • fix(packages): update dependency @fastify/static to v7
  • fix(packages): update dependency @octokit/rest to v20
  • fix(packages): update dependency mime to v4 (mime, @types/mime)
  • fix(packages): update dependency open to v10
  • fix(packages): update dependency picomatch to v4
  • fix(packages): update dependency remark-html to v16
  • fix(packages): update gatsby monorepo (major) (gatsby, gatsby-link, gatsby-plugin-image, gatsby-plugin-mdx, gatsby-plugin-react-helmet, gatsby-plugin-sharp, gatsby-source-filesystem, gatsby-transformer-remark, gatsby-transformer-sharp)
  • fix(packages): update mdx monorepo to v3 (major) (@mdx-js/mdx, @mdx-js/react)
  • fix(packages): update react monorepo to v18 (major) (react, react-dom)
  • ๐Ÿ” Create all pending approval PRs at once ๐Ÿ”

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/actions/cache-restore/action.yml
  • actions/setup-node v4
  • actions/cache v3
.github/workflows/release.yml
  • actions/checkout v4
  • actions/checkout v4
.github/workflows/validate_pr.yml
  • actions/checkout v4
  • actions/checkout v4
  • actions/checkout v4
  • actions/checkout v4
  • actions/checkout v4
  • actions/checkout v4
npm
integration-tests/plugin-fastify/package.json
  • fastify ^4.25.2
  • gatsby ^5.13.1
  • gatsby-plugin-image ^3.13.0
  • gatsby-plugin-manifest ^5.13.0
  • gatsby-plugin-postcss ^6.13.0
  • gatsby-plugin-sharp ^5.13.0
  • gatsby-plugin-sitemap ^6.13.0
  • gatsby-source-faker ^5.13.0
  • gatsby-source-filesystem ^5.13.0
  • gatsby-transformer-sharp ^5.13.0
  • postcss ^8.4.32
  • react ^18.2.0
  • react-dom ^18.2.0
  • @babel/core ^7.23.7
  • @babel/preset-typescript ^7.23.3
  • babel-loader ^9.1.3
  • babel-preset-gatsby ^3.13.0
  • benchmark ^2.1.4
integration-tests/source-airtable/markdown-docs/package.json
  • gatsby 3.15.0
  • gatsby-source-filesystem 3.15.0
  • gatsby-transformer-remark 4.12.0
  • react 17.0.2
  • react-dom 17.0.2
  • remark-html 14.0.1
  • nock 13.4.0
  • prettier 2.8.8
integration-tests/source-airtable/recipes-with-multi-type/package.json
  • @mdx-js/mdx 1.6.22
  • @mdx-js/react 1.6.22
  • gatsby 3.15.0
  • gatsby-link 3.15.0
  • gatsby-plugin-image 1.15.0
  • gatsby-plugin-mdx 2.15.0
  • gatsby-plugin-react-helmet 4.15.0
  • gatsby-plugin-sharp 3.15.0
  • gatsby-source-filesystem 3.15.0
  • gatsby-transformer-remark 4.12.0
  • gatsby-transformer-sharp 3.15.0
  • react 17.0.2
  • react-dom 17.0.2
  • react-helmet 6.1.0
  • nock 13.4.0
  • prettier 2.8.8
integration-tests/source-airtable/recipes-with-photos/package.json
  • gatsby 3.15.0
  • gatsby-link 3.15.0
  • gatsby-plugin-image 1.15.0
  • gatsby-plugin-react-helmet 4.15.0
  • gatsby-plugin-sharp 3.15.0
  • gatsby-source-filesystem 3.15.0
  • gatsby-transformer-sharp 3.15.0
  • react 17.0.2
  • react-dom 17.0.2
  • react-helmet 6.1.0
  • nock 13.4.0
  • prettier 2.8.8
integration-tests/source-airtable/testing-options/package.json
  • gatsby 3.15.0
  • gatsby-source-filesystem 3.15.0
  • gatsby-transformer-remark 4.12.0
  • react 17.0.2
  • react-dom 17.0.2
  • remark-html 14.0.1
  • nock 13.4.0
  • prettier 2.8.8
integration-tests/source-s3/package.json
  • gatsby ^5.13.1
  • gatsby-plugin-image ^3.13.0
  • gatsby-plugin-sharp ^5.13.0
  • gatsby-transformer-sharp ^5.13.0
  • react ^18.2.0
  • react-dom ^18.2.0
package.json
  • @babel/eslint-parser ^7.23.3
  • @babel/preset-react ^7.23.3
  • @changesets/changelog-github ^0.5.0
  • @changesets/cli ^2.27.1
  • @hkdobrev/run-if-changed ^0.3.1
  • @tsconfig/node20 ^20.1.2
  • @typescript-eslint/eslint-plugin ^6.16.0
  • @typescript-eslint/parser ^6.16.0
  • all-contributors-cli ^6.26.1
  • chalk ^5.3.0
  • eslint ^8.56.0
  • eslint-config-prettier ^9.1.0
  • eslint-plugin-react ^7.33.2
  • eslint-plugin-unicorn ^50.0.1
  • fs-extra ^11.2.0
  • husky ^8.0.3
  • lint-staged ^15.2.0
  • prettier ^3.1.1
  • renovate ^37.115.0
  • typescript ^5.3.3
  • yarn 4.0.2+sha256.825003a0f561ad09a3b1ac4a3b3ea6207af2796d54f62a9420520915721f5186
packages/gatsby-plugin-ackee-tracker/package.json
  • @babel/cli ^7.23.4
  • @babel/core ^7.23.7
  • ackee-tracker ^5.1.0
  • babel-preset-gatsby-package ^3.13.0
  • cross-env ^7.0.3
packages/gatsby-plugin-fastify/package.json
  • @babel/runtime ^7.23.7
  • @fastify/accepts ^4.3.0
  • @fastify/http-proxy ^8.4.0
  • @fastify/middie ^8.3.0
  • @fastify/static ^6.12.0
  • fastify-plugin ^4.5.1
  • fs-extra ^11.2.0
  • gatsby-core-utils ^4.13.0
  • gatsby-plugin-utils ^4.13.0
  • http-status-codes ^2.3.0
  • mime ^3.0.0
  • open ^8.4.2
  • picomatch ^2.3.1
  • yargs ^17.7.2
  • @babel/cli ^7.23.4
  • @babel/core ^7.23.7
  • @types/connect ^3.4.38
  • @types/fs-extra ^11.0.4
  • @types/jest ^29.5.11
  • @types/mime ^3.0.4
  • @types/node ^20.10.6
  • @types/picomatch ^2.3.3
  • @types/yargs ^17.0.32
  • babel-jest ^29.7.0
  • babel-preset-gatsby-package ^3.13.0
  • cross-env ^7.0.3
  • jest ^29.7.0
packages/gatsby-plugin-github-ribbon/package.json
  • request ^2.88.2
  • @babel/cli ^7.23.4
  • @babel/core ^7.23.7
  • babel-jest ^29.7.0
  • babel-preset-gatsby-package ^3.13.0
  • cross-env ^7.0.3
  • gatsby ^5.13.1
  • jest ^29.7.0
packages/gatsby-plugin-pinterest/package.json
  • @babel/runtime ^7.23.7
  • @babel/cli ^7.23.4
  • @babel/core ^7.23.7
  • babel-jest ^29.7.0
  • babel-preset-gatsby-package ^3.13.0
  • gatsby-plugin-utils ^4.13.0
  • jest ^29.7.0
packages/gatsby-plugin-readingtime/package.json
  • reading-time ^1.5.0
packages/gatsby-plugin-relative-ci/package.json
  • @relative-ci/agent ^4.2.3
  • @babel/cli ^7.23.4
  • @babel/core ^7.23.7
  • babel-preset-gatsby-package ^3.13.0
  • cross-env ^7.0.3
packages/gatsby-plugin-vanilla-extract/package.json
packages/gatsby-source-airtable/package.json
  • airtable ^0.12.2
  • bluebird ^3.7.2
  • mime ^2.6.0
  • covector 0.10.2
packages/gatsby-source-appwrite/package.json
packages/gatsby-source-packagist/package.json
  • @octokit/rest ^19.0.13
  • mime-types ^2.1.35
  • packagist-api-client ^2.0.0
  • @babel/cli ^7.23.4
  • @babel/core ^7.23.7
  • babel-preset-gatsby-package ^3.13.0
  • cross-env ^7.0.3
  • gatsby-source-filesystem ^5.13.0
packages/gatsby-source-s3/package.json
  • @aws-sdk/client-s3 ^3.484.0
  • @aws-sdk/s3-request-presigner ^3.484.0
  • @babel/runtime ^7.23.7
  • gatsby-source-filesystem ^5.13.0
  • @babel/cli ^7.23.4
  • @babel/core ^7.23.7
  • @types/node ^20.10.6
  • babel-preset-gatsby-package ^3.13.0
  • cypress ^12.17.4
  • start-server-and-test ^2.0.3
packages/gatsby-source-strapi/package.json
  • axios 1.6.3
  • commonmark ^0.30.0
  • gatsby-source-filesystem ^5.13.0
  • lodash ^4.17.21
  • qs ^6.11.2
  • @babel/cli 7.23.4
  • @babel/core 7.23.7
packages/gatsby-source-supabase/package.json
nvm
.nvmrc

  • Check this box to trigger a request for Renovate to run again on this repository

bug(gatsby-plugin-fastify): Client-only route that also uses getServerData is not working

Describe the bug

I created a client-only route inside src/pages/community/[...].tsx and following the gatsby documentation I exported a component containing a Router and some routes accessible only by registered users.

The problem I am facing is caused by adding getServerData to this page.
Even if the sub-routes of this page are accessible only by registered users I still have some data that should be fetched during ssr to configure the page and some of the sections it contains.

This line of code is what is causing the problem:

if (page?.matchPath && page?.mode !== "SSR" && page?.mode !== "DSG") {

Since client-only routes are registered only if they are not SSR or DSG, my page is not getting registered and I run into 404s when visiting any page under /community.

Should this line check for page?.matchPath?.endsWith('*') to register client routes instead?

System Info

System:
OS: macOS 13.0
CPU: (8) arm64 Apple M1
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 18.12.0 - ~/.nvm/versions/node/v18.12.0/bin/node
Yarn: 1.22.19 - ~/.nvm/versions/node/v18.12.0/bin/yarn
npm: 8.19.2 - ~/.nvm/versions/node/v18.12.0/bin/npm
Browsers:
Chrome: 107.0.5304.87
Safari: 16.1
npmPackages:
gatsby: ^4.24.6 => 4.24.6
gatsby-plugin-fastify: ^0.9.5 => 0.9.5
gatsby-plugin-image: ^2.24.0 => 2.24.0
gatsby-plugin-manifest: ^4.24.0 => 4.24.0
gatsby-plugin-react-i18next: ^2.0.4 => 2.0.5
gatsby-plugin-react-svg: ^3.1.0 => 3.1.0
gatsby-plugin-sass: ^5.24.0 => 5.24.0
gatsby-plugin-sharp: ^4.24.0 => 4.24.0
gatsby-source-filesystem: ^4.24.0 => 4.24.0
gatsby-transformer-sharp: ^4.24.0 => 4.24.0

add: gatsby-plugin-s3

Info

Overview

Hi, I saw this repo and I think it quite fits with my situation.
I maintain gatsby-plugin-s3, the recommended way to deploy to S3 in the gatsby docs itself.
I've largely declared the project as 'done' as it has generally achieved all the goals I personally set out for it, however, there's still quite the backlog of additional features people would like to see.
Me and my co-maintainer have largely moved on from this project however.
People have suggested me to ask Gatsby itself to pick up the plugin, but because it is a direct concurrent of their own service, I very much doubt they're interested in picking it up. ๐Ÿ˜‰

Tasks

Contributor Tasks:

Admin Tasks:

  • Move Code into gatsby-uc/plugins repo
    • Update Readme in old repo to redirect folks to new location
    • Archive old Repo
    • Close any irrelevant PRs/Issues
    • Move/Comment on still applicable issues
  • Update Plugin with best practices
  • Publish new version

Implement testing for various packages

Most of the packages here don't have testing. I don't have time to implement but if anyone does it'd be super helpful in giving more confidence around package updates and deploys.

  • gatsby-plugin-fastify - WIP: @moonmeister - #97
  • gatsby-plugin-relative-ci
  • gatsby-plugin-reading-time
  • gatsby-plugin-ackee-tracker

feat(gatsby-plugin-fastify): allow adding custom error/404 handlers

Is your feature request related to a problem? Please describe.

#105

also people might want to implement some kind of log tracking. figure out how to best do these.

Describe the solution you'd like

not really sure. could be a function where users can do anything. need to understand pino better and maybe errors and 404 should be handled differently.

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Location: renovate.json5
Error type: Invalid JSON5 (parsing failed)
Message: JSON5.parse error: JSON5: invalid character '{' at 42:5

feat(gatsby-plugin-fastify): add support for fastify `caseSensitive` option

Is your feature request related to a problem? Please describe.

Gatsby is often used with Wordpress. Wordpress does not follow RFC spec for case sensitivity in URLs (hence on a typical wordpress site, any casing in your URL will return the expected page and users are accustomed to this). Fastify URLs are case sensitive by default. Incorrectly cased URLs pointing at Wordpress sites do not work with this plugin. Unfortunately, this cannot always be controlled as the URLs may exist in third party systems.

Describe the solution you'd like

Either add support for configuration of Fastify caseSensitive option https://www.fastify.io/docs/latest/Reference/Server/#casesensitive or enable it by default.

Describe alternatives you've considered

I've currently worked around the issue by modifying my 404 page to add a frontend redirect, but it is far from ideal and causes a FOF0FC (like a FOUC but with 404 content). This results in the incorrectly cased URLs hitting the 404 page, redirecting to an all lowercase version to see if it's a real 404 or a casing issue, then they either get the correct page or 404 again.

const NotFoundPage = (): JSX.Element => {
  const [loading, setLoading] = React.useState(true)
  React.useEffect(() => {
    // hacky workaround for case sensitive URLs
    if (typeof window !== `undefined`) {
      const { pathname } = window.location
      const lowerPathname = pathname.toLowerCase()
      if (lowerPathname !== pathname) {
        window.location.replace(lowerPathname)
      } else {
        setLoading(false)
      }
    }
  }, [])
  return (
    <MainLayout breadcrumbs={null} localMenuItem={null} minHeight={false}>
      {loading ? (
        <div>Hang tight we're looking for that page!</div>
      ) : (
        <div className="main-container border-none">
          <h1>404 not found</h1>
          <p>The page you are looking for cannot be found</p>
          <p>
            Lost? Start over at our <Link to="/">home page</Link>
          </p>
        </div>
      )}
    </MainLayout>
  )
}

feat(gatsby-source-strapi): Graphql filter on one type doesn't work

Hi,

Question:
I use the queries below in the gatsby-graphql playground.
When I use the current query:

query MyQuery {
  allStrapiJob(filter: {data: {elemMatch: {id: {eq: 2}}}}) {
    nodes {
      data {
        attributes {
          slug
          title
        }
        id
      }
      id
    }
  }
}

I get this as a result

{
  "data": {
    "allStrapiJob": {
      "nodes": [
        {
          "data": [
            {
              "attributes": {
                "slug": "helpdesk-engineer-uk",
                "title": "Helpdesk Engineer"
              },
              "id": 1
            },
            {
              "attributes": {
                "slug": "frontend-developer",
                "title": "Frontend developer"
              },
              "id": 2
            }
          ],
          "id": "Job_undefined"
        }
      ]
    }
  },
  "extensions": {}
}

Always 2 results (there are 2 entries in strapi at the moment)
If I change the id to filter, to either 1 or 2, I always get 2 results.
When changing it to anything else then 1 or 2, I get nothing as a result.

What am I doing wrong here?

Also, I got "strapiJob" to use.

query MyQuery {
  strapiJob(data: {elemMatch: {id: {eq: 1}}}) {
    data {
      attributes {
        slug
        title
        description
      }
      id
    }
  }
}

Same result, always 2 entries.

bug(gatsby-plugin-fastify): using deprecated packages

Describe the bug

I can't build due to deprecation errors:

HttpErrorGeneral: 404 Not Found - GET https://registry.npmjs.org/fastify-accepts-deprecated - Not found and several other related errors with other fastify packages

It looks like all the fastify packages were moved to the @fastify scope

To Reproduce

Do a new install

Expected behavior

No errors

System Info

Please provide information about your site via these means as possible:

System:
OS: macOS 12.2
CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 16.13.1 - /var/folders/jf/5ss8k9vn7v91sn37s8b8zgzc0000gn/T/yarn--1654178606018-0.1492902467831616/node
Yarn: 1.22.4 - /var/folders/jf/5ss8k9vn7v91sn37s8b8zgzc0000gn/T/yarn--1654178606018-0.1492902467831616/yarn
npm: 8.1.2 - ~/.nvm/versions/node/v16.13.1/bin/npm
Languages:
Python: 2.7.18 - /usr/bin/python
Browsers:
Chrome: 102.0.5005.61
Firefox: 99.0.1
Safari: 15.3
npmPackages:
gatsby: ^4.13.1 => 4.13.1
gatsby-plugin-fastify: ^0.8.1 => 0.8.1
gatsby-plugin-gatsby-cloud: ^4.13.0 => 4.13.0
gatsby-plugin-image: ^2.13.0 => 2.13.0
gatsby-plugin-manifest: ^4.13.0 => 4.13.0
gatsby-plugin-offline: ^5.13.0 => 5.13.0
gatsby-plugin-postcss: ^5.3.0 => 5.3.0
gatsby-plugin-react-helmet: ^5.13.0 => 5.13.0
gatsby-plugin-sharp: ^4.13.0 => 4.13.0
gatsby-source-filesystem: ^4.13.0 => 4.15.0
gatsby-source-wordpress: ^6.15.0 => 6.15.0
gatsby-transformer-sharp: ^4.13.0 => 4.13.0

feat(gatsby-plugin-fastify): Support SSR routes with match paths

Is your feature request related to a problem? Please describe.

I'm trying to use this plugin and realized that the plugin does not support my serverside routes because they use match paths. Consider creating a page like this:

await createPage({
    path: `/furniture/product`,
    component: path.resolve(`./src/templates/ssr-product.jsx`),
    matchPath: `/furniture/product/*`,
  })

This creates an SSR page with a match path for all product description pages in my app. However, in the plugin code, it will treat any path with a match path as a clientside route?
https://github.com/gatsby-uc/plugins/blob/main/packages/gatsby-plugin-fastify/src/gatsby/clientSideRoutes.ts#L12

I don't think the plugin can sufficiently support ssr this way because having a match path has nothing to do with being client-side or server-side.

Describe the solution you'd like

Support being able to render ssr or dsg pages if they have match paths. This is already supported by gatsby serve but I do not want to use gatsby serve in production.

feat(gatsby-plugin-fasify): Server Side Caching

Is your feature request related to a problem? Please describe.

DSG in particular could benefit from caching. But SSR and static file serving could too. In particular not just files but their compressed versions so files aren't recompressed on every request.

LRU cache for most of this should be suitable. Maybe standard in memory cache for DSG, or even just persist DSG routes to disk then LRU from there.

Describe the solution you'd like

Tbd, research fastify/node options. Maybe even a separate caching layer?

feat(gatsby-source-strapi): singleType fetch error doesn't panic

I was wondering so hard why I didn't see my content in Gatsby. Turned out, the endpoint was giving an error 500 but that isn't handled by the source plugin. I guess here: https://github.com/strapi/gatsby-source-strapi/blob/c72d6c75edc6ab2a9857185946b4c979550b7a37/src/fetch.js#L92
no idea why this would be commented. It feels risky to not panic on fetch errors, right? But mostly this was some terrible DX. I just uncommented this code locally and I get a perfect error message in my build. Failed to fetch data from Strapi /api/company/usps with {"method":"GET","url":"/api/company/usps","params":{"populate":"*"}} Request failed with status code 500

add gatsby-source-s3

Plugin Repository

https://github.com/robinmetral/gatsby-source-s3

Plugin Package

https://www.npmjs.com/package/@robinmetral/gatsby-source-s3

Plugin Description

tl;dr: the plugin pulls images from AWS S3 buckets at build time. It enables Gatsby to process them with sharp, while hosting the raw images off of GitHubโ€”useful for image-heavy sites and blogs that don't use a CMS.


Extra context:

I didn't create the first ever gatsby-source-s3: the first one was made by DSchau, but it stopped being maintained long ago (last commit was in late 2019) and I created mine to fix existing issues with it. There's also jessestuart's gatsby-source-s3-image, which was written in TypeScript but also stopped being maintained a few years ago (last commit excluding automatic dep updates was in late 2019).

So my version of gatsby-source-s3 took aspects from these two unmaintained plugins and improved upon them.

Some key aspects:

  • It supports pulling from multiple and/or private S3 buckets
  • It's fully compatible with Gatsby v4 (recently updated)
  • It has a nice e2e test suite (bootstraps a real Gatsby site pulling from real S3 buckets inside GitHub actions)
  • TypeScript

Further Details

I'm in the exact scenario that you're describing in this repo's README. I initially asked if the plugin could be moved to the core monorepo and was sent here.

rewrite(gatsby-plugin-fastifty): Implement better logging

Is your feature request related to a problem? Please describe.

console logs everywhere aren't great. Needs something more granular. For instance, when running test we don't need any logging.

Describe the solution you'd like

Fastify uses pino internally. We could maybe use this or use pino on it's own. Needs more research.

bug(gatsby-plugin-fastify): Not work on docker

Describe the bug

I set GATSBY_SERVER_ADDRESS=0.0.0.0
fastify can not access ip of docker network. Fastify always use 170.0.0.1
And my nginx server can not access:

2022/10/04 02:42:20 [error] 24#24: *793 connect() failed (111: Connection refused) while connecting to upstream, client: 8.39.127.225, server: <domain>, request: "GET / HTTP/1.1", upstream: "http://172.25.0.7:3001/", host: <domain>

feat(gatsby-source-s3): download non-image files

I'd like to be able to retrieve files other than images from S3, and access them through GraphQL.

Currently, localfile nodes are only generated in GraphQL for image files, and not e.g.: mdx, json or other data/text files.

I'm specifically interested in mdx files (which I assume could then be ingested by gatsby-transformer-mdx).

Is there a design reason for only creating local file nodes for images? If there are drawbacks to handling all files, a config option for other file extensions to accept seems like a clean solution, e.g.:
{ resolve: 'gatsby-source-s3', options: { aws: { ... }, buckets: [...], file_extensions: ['.mdx', '.json'], },

feat(gatsby-source-strapi): Need a customize headers option pass to gatsby-source-filesystem plugin

Before this v4 plugin published, I use another plugin relate-app/gatsby-source-strapi for replaced. That plugin document has provide options but not passing headers, I don't know why.

But add a additional headers it really useful. Sometimes markdown content has a CDN image with security policy cannot visit directly, we need send customize headers for gatsby node request. Or it will throw an error as:

image

I can temporary fix it through edit my local node_modules files, but not a good way if I install depencies package next time. So I think it it necessary to be added.

I change my local files temporary:

// gatsby-config.js
const strapiConfig = {
  apiURL: process.env.STRAPI_API_URL,
  accessToken: process.env.STRAPI_TOKEN,
  collectionTypes: [`post`, `category`, `tag`, `page`],
  singleTypes: [],
  headers: {
    Referer: 'https://www.whidy.net/'
  }
};

and node_modules/gatsby-source-strapi/lib/download-media-files.js which is near https://github.com/strapi/gatsby-source-strapi/blob/74e9f5c0e38149e4c3c144449312343c1ae4a565/src/download-media-files.js#L77

      const fileNode = await (0, _gatsbySourceFilesystem.createRemoteFileNode)({
        url: source_url,
        store,
        cache,
        createNode,
        createNodeId,
        httpHeaders: strapiConfig.headers
      });

after that, file will be get and save to .cache/caches/gatsby-source-strapi folder fine.

relate issue: headers Option not working

add: gatsby-source-supabase

Plugin Repository

alan2207/gatsby-source-supabase

Plugin Package

package/gatsby-source-supabase

Plugin Description

Sources data from supabase

Tasks

Contributor Tasks:

Admin Tasks:

  • Move Code into gatsby-uc/plugins repo
    • Update Readme in old repo to redirect folks to new location
    • Archive old Repo
    • Close any irrelevant PRs/Issues
    • Move/Comment on still applicable issues
  • Update Plugin with best practices
  • Publish new version

bug(gatsby-source-strapi): Image processing breaks when using relation field in Dynamic Zone

Hello,

I understand there was a previous issue where gatsby image processing was not occurring when using images in Dynamic Zone. This bug was fixed in this PR gatsby-uc/gatsby-source-strapi#266.

However, I believe I have found a separate instance where gatsby sharp image processing breaks. I have a collection type called PageTemplate. This collection has a dynamic zone called "sections" which contains a few relations to other collection types. For example, the statsModule (labeled Stats in the Dynamic Zone) is a relation field that contains some images. However, when I query the PageTemplate, I cannot access the localFile field for the images within the Stats section.

PageTemplate setup in strapi
Screen Shot 2022-07-20 at 2 06 03 PM

PageTemplate query (localFile not found)
Screen Shot 2022-07-20 at 2 05 41 PM

I am running on gatsby-source-strapi v 2.0.0 and strapi 4.1.0

bug(gatsby-source-s3): Access Denied error on gatsby develop

Describe the bug

This is more of a help request than a bug report. I'm both seeking clarity whether this is a known issue, a misconfiguration on my end, or whether this plugin support v4.

Following Gatsby and S3 configuration, gatsby develop returns:

 ERROR 

Error listing S3 objects on bucket "aarome-regeneration": AccessDenied: Access Denied


 ERROR 

Error processing objects from bucket "aarome-regeneration". Is it empty?

To Reproduce

gatsby new test
cd test
npm install gatsby-source-s3

Add to plugins:

 {
      resolve: `gatsby-source-s3`,
      options: {
        aws: {
          accessKeyId: process.env.AWS_ACCESS_KEY_ID,
          secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,
          region: process.env.AWS_REGION,
        },
        buckets: ["my-bucket"],
        expiration: 120,
      },
    },

Add AWS credentials to .env and populate bucket with one jpg file, then:

gatsby develop

Bootstrapping Gatsby returns the error captioned above. Note my credentials are correct as I can access the bucket and its object via the AWS S3 API, i.e.:

$ aws s3 ls s3://my-bucket --profile my-profile
2022-03-05 21:04:31      39550 my-object.jpg

System Info

  System:
    OS: macOS Mojave 10.14.6
    CPU: (12) x64 Intel(R) Xeon(R) CPU E5-1650 v2 @ 3.50GHz
    Shell: 5.3 - /bin/zsh
  Binaries:
    Node: 14.17.0 - /var/folders/5c/f0vhx9g11j9czgy6d0qvb7sh0000gn/T/yarn--1646533696946-0.8533512682878359/node
    Yarn: 1.22.10 - /var/folders/5c/f0vhx9g11j9czgy6d0qvb7sh0000gn/T/yarn--1646533696946-0.8533512682878359/yarn
    npm: 6.14.13 - ~/.nvm/versions/node/v14.17.0/bin/npm
  Languages:
    Python: 2.7.16 - /usr/bin/python
  Browsers:
    Chrome: 98.0.4758.109
    Firefox: 87.0
    Safari: 14.1.2
  npmPackages:
    gatsby: ^4.9.0 => 4.9.0
    gatsby-plugin-gatsby-cloud: ^4.9.0 => 4.9.0
    gatsby-plugin-manifest: ^4.9.0 => 4.9.0
    gatsby-plugin-mdx: ^3.9.0 => 3.9.0
    gatsby-plugin-page-creator: ^4.9.0 => 4.9.0
    gatsby-plugin-postcss: ^5.9.0 => 5.9.0
    gatsby-plugin-react-helmet: ^5.9.0 => 5.9.0
    gatsby-source-filesystem: ^4.9.0 => 4.9.0
    gatsby-source-s3: ^3.1.0 => 3.1.0
    gatsby-theme-i18n: ^3.0.0 => 3.0.0
    gatsby-theme-i18n-react-i18next: ^3.0.0 => 3.0.0

bug(gatsby-plugin-fastify): Fastify style splat routes break windows

Describe the bug

The repo cannot be cloned for contributing on Windows (see: https://stackoverflow.com/questions/63727594/github-git-checkout-returns-error-invalid-path-on-windows) ... I know, windows lol, but that's what I have at work and I can't bring in my macbook.

When cloning, the errors below come up. Windows can't have : in the filename. Workarounds on stackoverflow are cumbersome and generally include renaming the files and/or opening security vulnerabilities. Is the : necessary?

The offending files are in https://github.com/gatsby-uc/plugins/tree/main/integration-tests/plugin-fastify/src/api/splat/:splat.js and https://github.com/gatsby-uc/plugins/tree/main/integration-tests/plugin-fastify/src/api/test1/:splat.js

Cloning into 'C:\Users\user\Documents\GitHub\gatsby-uc\plugins'...
remote: Enumerating objects: 6434, done.        
remote: Counting objects: 100% (508/508), done.        
remote: Compressing objects: 100% (226/226), done.        
remote: Total 6434 (delta 295), reused 462 (delta 263), pack-reused 5926        
Receiving objects: 100% (6434/6434), 16.46 MiB | 3.18 MiB/s, done.
Resolving deltas: 100% (2266/2266), done.
error: invalid path 'integration-tests/plugin-fastify/src/api/splat/:splat.js'
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'

To Reproduce

clone repo in windows

Expected behavior

clone works

System Info

windows

bug(gatsby-plugin-ackee-tracker): Plugin isn't working

Describe the bug

No tracking is done for my website with any version later than 3.0.0.
As far as I can tell the plugin is missing completely from the build.
With v3.0.0 I can see the tracker module when I search the source code in the dev tools:
tracker

But I also get these errors and the site isn't loading:
image

With versions later than v3.0.0 (I tried 3.0.1 and 3.0.3) I can't find the tracker in the source.
image

To Reproduce

I installed and ran a fresh gatsby site of the same version as mine (3.14.3), with the bare minimum of dependencies and the ackee tracker.
It can be found here. It's still isn't working.

Steps to reproduce the behavior:

  1. Clone my reproducible example or install a fresh gatsby site yourself (v3.14.3)
  2. Run an ackee server and add a new domain. Make sure your ENV has correct values.
  3. In the new Gatsby site, add an .env file with values pointing to your local ackee server.
  4. build and serve the gatsby site.
  5. No site views are visible in the ackee server dashboard, and no plugin is visible in source tab of the devtools.

Expected behavior

Tracking should be enabled and visible in my Ackee server.

System Info

System:
OS: Windows 10 10.0.19042
CPU: (4) x64 Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz
Binaries:
Node: 14.16.0 - ~\AppData\Local\Temp\yarn--1635323849652-0.15124438061957246\node.CMD
Yarn: 1.22.10 - ~\AppData\Local\Temp\yarn--1635323849652-0.15124438061957246\yarn.CMD
npm: 6.14.11 - C:\Program Files\nodejs\npm.CMD
Languages:
Python: 3.9.2 - C:\Python39\python.EXE
Browsers:
Chrome: 95.0.4638.54
Edge: Spartan (44.19041.1266.0), Chromium (95.0.1020.30)
npmPackages:
gatsby: ^3.14.3 => 3.14.3
gatsby-plugin-ackee-tracker: ^3.0.3 => 3.0.3
gatsby-plugin-gatsby-cloud: ^2.11.0 => 2.11.0
gatsby-plugin-image: ^1.14.1 => 1.14.1
gatsby-plugin-loadable-components-ssr: ^3.4.0 => 3.4.0
gatsby-plugin-manifest: ^3.14.0 => 3.14.0
gatsby-plugin-material-ui: ^3.0.1 => 3.0.1
gatsby-plugin-offline: ^4.14.0 => 4.14.0
gatsby-plugin-react-helmet: ^4.14.0 => 4.14.0
gatsby-plugin-sass: ^4.14.0 => 4.14.0
gatsby-plugin-sharp: ^3.14.1 => 3.14.1
gatsby-plugin-webpack-bundle-analyser-v2: ^1.1.24 => 1.1.25
gatsby-source-filesystem: ^3.14.0 => 3.14.0
gatsby-transformer-sharp: ^3.14.0 => 3.14.0

The original repo is available here.

Please let me know if I can provide more information to help solve this.
Thank you ๐Ÿ™

bug(gatsby-plugin-fastify): SSR fallback routes do not work

Describe the bug

Regular Gatsby SSR routes work fine but SSR fallback routes (as documented here: https://www.gatsbyjs.com/docs/reference/routing/file-system-route-api/#collection-route--fallback) do not work on the fastify server (they do in dev and gatsbycloud)

To Reproduce

  1. Create some File System Routing API pages from your CMS data pages/{nodeType.uri}.tsx where the URI may included a nested page structure such as /nested/some-page
  2. Create an SSR fallback route like pages/nested/[slug].tsx which should be used for any uri such as /nested/this-page-does-not-exist-in-the-cms so the data can be sourced from the CMS (or elsewhere) at runtime to see if it does in fact exist

Reproduction: https://github.com/tsdexter/gatsby-fastify-ssrrepro
Fallback route does not work on a fastify server: https://hxquaxlw4hzlpgivnrnsslv5c.js.wpenginepowered.com/

Notice when you click the link to 'SSR Fallback Page' (/nested/fallback) it returns a 404 error

Expected behavior

Fallback route does work on gatsbycloud (and during npm run develop): https://gatsbyfastifyssrrepromaster.gatsbyjs.io/

Notice when you click the 'SSR Fallback Page' (/nested/fallback) the page does load and in the content area outputs the slug param that was passed from the server - note: you can also browse to any slug in the /nested/* path and it will load as well, ie: https://gatsbyfastifyssrrepromaster.gatsbyjs.io/nested/any-possible-slug

System Info

Please provide information about your site via these means as possible:

System:
OS: Windows 10 10.0.19044
CPU: (16) x64 11th Gen Intel(R) Core(TM) i7-11850H @ 2.50GHz
Binaries:
Node: 16.15.1 - C:\Program Files\nodejs\node.EXE
npm: 8.11.0 - C:\Program Files\nodejs\npm.CMD
Languages:
Python: 3.10.5 - /c/Python310/python
Browsers:
Edge: Spartan (44.19041.1266.0), Chromium (103.0.1264.62)
npmPackages:
gatsby: ^4.19.1 => 4.19.1
gatsby-plugin-fastify: ^0.8.1 => 0.8.1
npmGlobalPackages:
gatsby-cli: 4.18.1

bug(gatsby-plugin-fastify): query parameters for ssr page

Describe the bug

I have one SSR page index.tsx which takes one query parameter c. Example => http://localhost:8000/?c=E5kKbMXNRPw

When i start server and visit root page with query parameter http://localhost:8000/?c=E5kKbMXNRPw
I get error message - {"level":50,"time":1664189278263,"pid":37352,"hostname":"DESKTOP-aaa","msg":"Error processing /?c=E5kKbMXNRPw, No page found for /?c=E5kKbMXNRPw"}
and Internal Server Error is shown in web browser.

[Update]
Logs with log level Trace:

{"level":30,"time":1664206926085,"pid":32988,"hostname":"DESKTOP-aaa","reqId":"req-2","req":{"method":"GET","url":"/?c=dA6RNY7VMJr","hostname":"localhost:8000","remoteAddress":"127.0.0.1","remotePort":54547},"msg":"incoming request"}
{"level":20,"time":1664206926085,"pid":32988,"hostname":"DESKTOP-aaa","msg":"DSG/SSR for \"text/html\" @  /?c=dA6RNY7VMJr"}
{"level":50,"time":1664206926086,"pid":32988,"hostname":"DESKTOP-aaa","msg":"Error processing /?c=dA6RNY7VMJr, No page found for /?c=dA6RNY7VMJr"}
{"level":30,"time":1664206926086,"pid":32988,"hostname":"DESKTOP-aaa","reqId":"req-2","res":{"statusCode":500},"responseTime":0.9972000122070312,"msg":"request completed"}

http://localhost:8000/ works fine, but as soon as i add query parameter, server does not works.

Expected behavior

Root page (index.tsx) should be loaded and Query parameter should be passed to
export async function getServerData(data: GetServerDataProps): GetServerDataReturn {
method.

System Info

System:
OS: Windows 10 10.0.19044
CPU: (12) x64 AMD Ryzen 5 5600X 6-Core Processor
Binaries:
Node: 14.20.0 - C:\Program Files\nodejs\node.EXE
npm: 6.14.17 - C:\Program Files\nodejs\npm.CMD
Languages:
Python: 3.9.12
Browsers:
Edge: Spartan (44.19041.1266.0), Chromium (105.0.1343.50)
npmPackages:
gatsby: ^4.23.0 => 4.23.1
gatsby-plugin-fastify: ^0.9.0 => 0.9.2
gatsby-plugin-image: ^2.23.1 => 2.23.1
gatsby-plugin-manifest: ^4.23.0 => 4.23.1
gatsby-plugin-postcss: ^5.23.0 => 5.23.0
gatsby-plugin-sharp: ^4.23.1 => 4.23.1
gatsby-source-filesystem: ^4.23.0 => 4.23.0
gatsby-transformer-sharp: ^4.23.1 => 4.23.1
npmGlobalPackages:
gatsby-cli: 4.23.0

package.json

 "dependencies": {
    "axios": "^0.27.2",
    "fastify": "^4.6.0",
    "gatsby": "^4.23.0",
    "gatsby-plugin-fastify": "^0.9.0",
    "gatsby-plugin-image": "^2.23.1",
    "gatsby-plugin-manifest": "^4.23.0",
    "gatsby-plugin-sharp": "^4.23.1",
    "gatsby-source-filesystem": "^4.23.0",
    "gatsby-transformer-sharp": "^4.23.1",
    "http-status-codes": "^2.2.0",
    "react": "^18.1.0",
    "react-dom": "^18.1.0"
  },
  "devDependencies": {
    "@types/node": "^17.0.45",
    "@types/react": "^18.0.19",
    "@types/react-dom": "^18.0.6",
    "autoprefixer": "^10.4.11",
    "gatsby-plugin-postcss": "^5.23.0",
    "postcss": "^8.4.16",
    "tailwindcss": "^3.1.8",
    "typescript": "^4.8.3"
  }

bug(gatsby-source-strapi): Relations are not picked up if they are named "parent" or "children"

Since "parent" and "children" are reserved keywords in gatsby, this plugin automatically appends "strapi_" to the relation name. Since the relations are now named "strapi_parent" and "strapi_children" the code on this line doesn't work, https://github.com/strapi/gatsby-source-strapi/blob/2a60320b16ae6520617d743158c433d384dbd155/src/download-media-files.js#L117, since the relations on the strapi schema are named just "parent" and "children", but attributeName is "strapi_parent" and "strapi_children".
This problem is related to the other issue I have with relations: gatsby-uc/gatsby-source-strapi#308, because without changing the code to schema.schema.attributes[attributeName.replace('strapi_', '')] the fix I illustrated in the other issue doesn't work because the fields generated from this plugin and the schema on strapi are different

feat(gatsby-plugin-fastify): TS Types

Is your feature request related to a problem? Please describe.

If folks are building a custom server none of the TS types are being shipped with the package. IT'd be nice to provide those.

Describe the solution you'd like

Make sure TS types are included in the package.

add gatsby-plugin-pinterest

Plugin Repository

https://github.com/robinmetral/gatsby-plugin-pinterest

Plugin Package

https://www.npmjs.com/package/gatsby-plugin-pinterest

Plugin Description

Plugin to inject Pinterest's script at runtime. There are two main use-cases of it:

  • Pinterest embeds (for example, the plugin is used under the hood by gatsby-remark-embedder)
  • Show the Pinterest "save" button on images (with options)

Further Details

I was happy with the transfer of gatsby-source-s3 and since I'm less involved with Gatsby in general, I'd love to transfer my other plugin. Let me know if you're happy to have it @moonmeister, and I'll be happy to help with ownership transfers, PRs or the like!

Tasks

Contributor Tasks:

Admin Tasks:

  • Move code into gatsby-uc/plugins repo
    • Update Readme in old repo to redirect folks to new location using template.
    • Archive old Repo
    • Close any irrelevant PRs/issues
    • Move/Comment on still applicable PRs/issues
  • Update Plugin with best practices
  • Publish new version

feat(gatsby-plugin-fastify): Security Headers

Is your feature request related to a problem? Please describe.
There's no ability to add any custom headers or good defaults around security headers.

Describe the solution you'd like
I'd like to see some good defaults around security headers with the ability to override as desired.

bug (gatsby-source-strapi): Build breaks trying to display RichText changes (richtext.data = null)

Hi there,

I hope this is the right place to address this issues, maybe it has to do with another plugin I am using, currently not sure. So I start here, because I can't find anything on the web regarding this.

My problem is around previewing richtext content updates, AFTER they are initially filled. So in a single-type (/previewtest), I have a richtext-field and when I initially put content in there and hit the blue gatsby-preview button, the (incremental) build is fine and shows as deployed. All as intended.

But when I go back to Strapi and change the richtext field again (bold some text, or add another paragraph) and hit the preview button again, the build seems to be fine (Gatsbycloud says its built and deployed) but the preview shows as plain text and the console is throwing the following error;

XHR GET https://preview-exampleproject.gtsb.io/usr/src/app/www/public/page-data/previewtest/page-data.json [HTTP/2 404 Not Found 520ms]

This page is in Quirks Mode. Page layout may be impacted. For Standards Mode use โ€œ<!DOCTYPE html>โ€.


Preview build error
There was an error when building the preview page for this page ("/previewtest/").

TypeError: Cannot read property 'richtext' of null
    at PreviewTest (/usr/src/app/www/.cache/page-ssr/routes/webpack:/exampleproject/src/pages/previewtest.js:17:43)
    at d (/usr/src/app/www/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:33:498)
    at bb (/usr/src/app/www/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:36:16)
    at a.b.render (/usr/src/app/www/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:42:43)
    at a.b.read (/usr/src/app/www/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:41:83)
    at renderToString (/usr/src/app/www/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:52:138)
    at Object.staticPage [as default] (/usr/src/app/www/.cache/page-ssr/routes/webpack:/exampleproject/.cache/static-entry.js:295:22)
    at _bluebird.default.map.concurrency (/usr/src/app/www/node_modules/gatsby/src/utils/worker/child/render-html.ts:162:11)

"previewtest" is my single-type which holds the richtext data.
"exampleproject" is my projectname in gatsby.

Further information:

It all works as intended, if I change any other field from that single-type (previewtest). With changes in media-fields and/or non-html text, it all builds a correct preview and shows the content changes in the frontend.

Query:

{ strapiPreviewtest { updatedAt headline richtext { data { id richtext childMarkdownRemark { html } } } image { alternativeText localFile { url childImageSharp { gatsbyImageData(aspectRatio: 1.7) } } } } }

frontend rendering:

<div dangerouslySetInnerHTML={{__html: previewtest.richtext.data.childMarkdownRemark.html}} />

system:
Strapi v4.1.9 (heroku)
Gatsby v4.13.0 (gatsby cloud)

(some) plugins I am using;

  • gatsby-source-strapi
  • gatsby-transformer-remark
  • strapi-plugin-gatsby-preview

Can someone point me towards the right direction? Is this a cache problem?
Does it has to do with the content-sync of gatsbycloud? Or strapi-chaching?
Or dangerouslySetInnerHTML? Thank you for any help on this.

bug(gatsby-source-s3): There was an error in your GraphQL query

In Gatsby 4.23.0 switched from:
"@robinmetral/gatsby-source-s3": "^3.0.0",
to:
"gatsby-source-s3": "^3.1.2",

The build (Gatsby Cloud) did not complete, showing error:

ERROR There was an error in your GraphQL query:
If you don't expect "allS3Object" to exist on the type "Query" it is most likely a typo.
...

Tried and checked many times, same error.
Eventually had to revert back to @robinmetral/gatsby-source-s3.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.