birkir / gatsby-source-prismic-graphql

Gatsby source plugin for Prismic GraphQL
MIT License
137 stars 75 forks source link

Fix broken builds by removing `y` from `sortType` #250

Closed jamesisaac closed 3 years ago

jamesisaac commented 4 years ago

My builds have suddenly started breaking without this. Don't ask me why it's necessary... I'm guessing Prismic changed their API? Can anyone else confirm?

Example of the change in types I'm seeing: PRISMIC_SortBlog_posty has become PRISMIC_SortBlog_post.

cbasJS commented 3 years ago

Same trouble here! @jamesisaac

cbasJS commented 3 years ago

Do you find another solution?

jamesisaac commented 3 years ago

@cbasJS My solution was the change in this PR. You can use patch-package to apply it.

However, the Prismic API started including y again for me on September 23rd (a few weeks after submitting this PR), so I was able to revert this change. Not sure what's going on there...

cbasJS commented 3 years ago

@jamesisaac Patch-package module it's working to me. So I'm pretty grateful.

jamesisaac commented 3 years ago

@birkir I'm not sure if this should really be merged, as it sounds like like this is a result of Prismic's API returning different things to different people:

And seeing as no one else has confirmed this, we may be in the minority.

I opened a support ticket with Prismic regarding this a while ago but they never got back. Will chase to see if they can shed any light on what's going on.

Heyrows commented 3 years ago

Hi @birkir,

I'm Amaury from Prismic. The "y" is a typo that was introduced long ago in our API.

We have finally decided to bundle that typo fix with other fixes for our out-of-beta release which is planned for Q2 2021. This will allow us to introduce all the breaking change at once and have enough time to tell our clients about the coming changes in our API.

In the meantime, this revert needs to be merged before the next publication in order to avoid breaking the website of everyone using this plugin.