Gatsby-source-prismic and gatsby-source-prismic-graphql: do i need migrate?

Hi, my name is Mitya. I read the recommendations about migration from gatsby-source-prismic-graphql to gatsby-source-prismic. And I have questions, could you please take a look on them?

  1. Do I need to migrate to gatsby-source-prismic immediately or I can leave my site with old plugin for some time (1 month, 1 year)?

  2. Is it possible to update to Gatsby 3 with old plugin (gatsby-source-prismic-graphql)?

  3. Does anybody have the experience of successful migration? I am trying to migrate and can not do it for about a week :cold_face:

Thank you.

Hey, @dmitry.d welcome to the Prismic community!

I'll be happy to answer any questions you have.

  1. We highly recommend that you migrate to the new recommended plugin. gatsby-source-prismic is the one we support and continuously maintain. This means that we actively update the documentation and address issues and bugs related to it. With the old plugin, there's the risk of not having reliable support on our side if any problems come along.
  2. We don't have information about the old plugin. So we couldn't tell if it has had updates to match Gatsby's new versions.
  3. Are you finding any particular blockers? You can ask us for help o troubleshoot your project when you migrate.

This thread has been closed due to inactivity. Flag to reopen.

Hi, @Pau. Thank you for information. I have particular blocker and question. The blocker is: I can not deal with my Layout component. With old plugin I made static query for data in it. How can I get data for Layout (header, footer) with new plugin? Do I need add layout to createPages in gatsby-node.js? Can I make static query?

Hey @dmitry.d, there are many ways to do this. Here are three suggestions:

  • You could do what you mentioned, you could apply a useStaticQuery in your Layout component.
  • Add a Fragment to your page queries
  • Or, you could just add the query of the data you need for the layout in the same page query, but this would make the code a little bit longer.
1 Like

This thread has been closed due to inactivity. Flag to reopen.