Closed mcueto closed 1 year ago
Should we try making the gatsby dependencies a peerDependency instead of a regular dependency so we can have the peer set to 4 / 5? 🤔 that way it's up to the project to make sure the correct versions exist for their projects and we can keep our package backwards compatible
Ok I will try that and then tell you what is the outcome
Added as peerDependency
and tested on gatsby 4 and 5.
I also added some instructions to the readme.md file in order to let the users know what to do when installing for both versions.
(ps: I Think the readme file must be renamed to README.md
.
Hi @freekrai please approve the workflow when possible, I have been testing gatsby 5 + the Slices API + directus and it works! :partying_face:
I'll be looking over this PR this week, also want to make sure the plug-in continues to work for 4 users as well so will be testing and posting comments
Hi! @freekrai there's any issue or concern regarding this PR not being approved yet? We've ongoing projects that will benefit from this, now as a workaround, we are installing the plugin directly from @mcueto fork Thanks!
Sorry to bother you here again here, but can be the npm package updated to include these changes?
Sorry to bother you here again here, but can be the npm package updated to include these changes?
Yes! Going up now 👍🏻
Hi guys!
I was updating to
gatsby 5
fromgatsby 4
and agraphql
lib dependency error ocurred(multiple versions were being installed).What was the problem it was generating?
The dependencies were conflicting and therefore the graphql schema for directus wasn't being generated.
How did I fix it?
I just updated the dependencies in the plugin to it's 5.x versions, that fixed the problem.
Which problems still exists with this approach?
There may be breaking changes if you try to install this package on a gatsby 4 website, I tested setting the requirements as
^4
and4 - 5
and in both casesnpm
was installing the last version, so no gatsby 4 compatibility and that could be an issue.I ended up setting them as
5.2.0
which is the last stable version of both dependencies, with that it works as expected ongatsby 5
.to install it use
and then you will be able to query your schema again
Note to the maintainers
I didn't update the package version because I didn't know whats the correct version to make it not backwards compatible or how you would solve those "breaking changes" aforementioned.
Cheers!