Gatsby: Deprecate "allSite" GraphQL type

Created on 16 Jul 2019  Â·  13Comments  Â·  Source: gatsbyjs/gatsby

There's a Site node type which is why it's created but there's obviously only one site so having allSite is confusing.

@freiksenet

good first issue help wanted stale? GraphQL

Most helpful comment

Should this be considered breaking change? Agree with allSite being unnecessary, but still - people could use it

All 13 comments

Should this be considered breaking change? Agree with allSite being unnecessary, but still - people could use it

I agree with @pieh , people could be using this.

yeah — we can deprecate this initially and remove it in v3. If we deprecate it it'll keep working but not show up in graphiql which is my main goal.

Notes on what needs to be done in case it helps first time contributors 🙂

  • [ ] Deprecate the field (Example in https://github.com/gatsbyjs/gatsby/pull/15409)
  • [ ] Ensure there is no usage of it in this monorepo

Oh could i have a go at this?

Absolutely @molebox 🙌

Is there any chance i could get a little guidance with this? I know its a simple fix but im very lost in the gatsby repo.

I thought it would be as simple as doing a search for where allSite is declared and go from there but thats turned up nothing for me. Im not 100% where to begin...

Hey @molebox, I believe Gatsby register allSite type here.

To remove allSite type, on line 903 you can do something like this:

queryNamePlural !== "allSite" && [queryNamePlural]: {

But I'm not sure how to deprecate it. Maybe Gatsby have an extension for that?

If not, I think a reasonable solution to do is to "declare" it as deprecated, check whether it's used, and report that it's deprecated. And then remove it in v3.

Any thoughts, @sidharthachatterjee?

We want it not showing up in the grapiql API which means it needs deprecated.

The fix is to add some code which finds this type and adds deprecated: true

just wanted to give an update... ive been on holiday but am back this weekend so will get on this! Sorry for the delay! :)

Hiya!

This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here.

If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!

As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! 💪💜

My bad ive been busy with other stuff and forgot i was assigned to this! I had solution though im not sure im on the right path.

Would someone be able to take a look before a open a PR?

Hey again!

It’s been 30 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it.

Please keep in mind that I’m only a robot, so if I’ve closed this issue in error, I’m HUMAN_EMOTION_SORRY. Please feel free to reopen this issue or create a new one if you need anything else.

As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks again for being part of the Gatsby community!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

benstr picture benstr  Â·  3Comments

dustinhorton picture dustinhorton  Â·  3Comments

rossPatton picture rossPatton  Â·  3Comments

theduke picture theduke  Â·  3Comments

Oppenheimer1 picture Oppenheimer1  Â·  3Comments