imgix/gatsby

Warning during build when using with `gatsby-source-shopify`

dungle-scrubs opened this issue · 5 comments

Hi,

When I use @imgix/gatsby with gatsby-source-shopify I've been getting these warnings the entire time, although everything still builds and works as expected.

warn Plugin `@imgix/gatsby` has customized the GraphQL type `ShopifyCollectionImage`, which has already been defined by the plugin `gatsby-source-shopify`. This could potentially cause conflicts.
warn Plugin `@imgix/gatsby` has customized the GraphQL type `ShopifyProductImage`, which has already been defined by the plugin `gatsby-source-shopify`. This could potentially cause conflicts.
warn Plugin `@imgix/gatsby` has customized the GraphQL type `ShopifyProductVariantImage`, which has already been defined by the plugin `gatsby-source-shopify`. This could potentially cause conflicts.
warn Plugin `@imgix/gatsby` has customized the GraphQL type `ShopifyProductFeaturedImage`, which has already been defined by the plugin `gatsby-source-shopify`. This could potentially cause conflicts.

Just wondering what's causing them and if it's something to worry about?

Hey @dungle-scrubs, thanks for opening this issue 👋

I'll bring this up with our engineering team and someone should get back to you with a response soon.

Hey @dungle-scrubs just wanted to quickly follow up here. After speaking to the team, it seems like this is expected behavior and there’s not much we can do currently to get around it. We'll look into documenting this behavior to help future users until something changes.

Thx for looking into it. I've noticed it for a while but it's never broken anything. Was just wondering if it's something to be concerned about and sounds like it's not a big deal.

Hey @dungle-scrubs,

Thanks again for reporting this. We're adding some information to our docs to make this clearer in future.

What’s going on here is that gatsby-imgix modifies existing GraphQl types in order to expose our own types on those same fields. This allows for a more seamless integration with Gatsby. Gatsby throws a warning because, as of right now, the compiler does not expect these types to be set by two different plugins. But this warning can be safely ignored, ie this should not impact your build in any way.

You can read more about this if you’re interested here:

🎉 This issue has been resolved in version 1.6.10 🎉

The release is available on:

Your semantic-release bot 📦🚀