-
Notifications
You must be signed in to change notification settings - Fork 12
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
Improvements/gatsby 5 compatibility #21
Improvements/gatsby 5 compatibility #21
Conversation
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 |
Hi @freekrai please approve the workflow when possible, I have been testing gatsby 5 + the Slices API + directus and it works! 🥳 |
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 |
Sorry to bother you here again here, but can be the npm package updated to include these changes? |
"peerDependencies": { | ||
"gatsby-source-filesystem": "4||5", | ||
"gatsby-source-graphql": "4||5", | ||
"eslint": "7||8" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for this post-review, but why eslint
as a peer dependency?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will check it out during the weekend and then will add another comment in here.
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!