Closed shoamano83 closed 1 year ago
Hello. First of all, thank you for maintaining a useful plugin!
I debugged the issue and created a PR. I know this is really a corner-case issue, but I would appreciate if you could include the patch (and publish a new version!)
Thanks!
Describe the bug
I use two instances of this plugin to read out two Google spreadsheets. With Gatsby v4 and later, I noticed that rows from a worksheet are mixed up with rows from another worksheet, when one of the worksheet was duplicated from another.
To Reproduce
Steps to reproduce the behavior:
Create a Google spreadsheet, let's say "SampleSpreadsheet1". It contains a worksheet called "SheetA". Put some data on it. Example
Duplicate the spreadsheet using "File" -> "Make a copy" menu. Name the new spreadsheet as "SampleSpreadsheet2".
Edit the new spreadsheet; modify some data, and rename the worksheet to be "SheetB". Example
Set up a Gatsby project (v4 or later) and configure it to use two instances of this plugin.
Add codes to examine output of GraphQL
allGoogleSheetASheet
andallGoogleSheetBSheet
.run
npm run build
and examine the output.Minimal reproduction: https://github.com/shoamano83/repro-gatsby-source-google-spreadsheets-duplicate-sheets
When I run
npm run build
, I see following in the log:Two rows from SheetB (Dave and Ellen) are pushed to SheetA as well.
Expected behavior
Rows from
allGoogleSheetASheet
should not mixed up with those fromallGoogleSheetBSheet
. With the above minimal reproduction, I expect to see something like this in the log:Additional context
The issue reproduced with Gatsby v4.25.4 and v5.6.1. I did not see the issue with Gatsby v3.