imgix / gatsby

A simple yet powerful integration between Gatsby and imgix
BSD 2-Clause "Simplified" License
30 stars 6 forks source link

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

Closed dungle-scrubs closed 3 years ago

dungle-scrubs commented 3 years ago

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?

sherwinski commented 3 years ago

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.

sherwinski commented 3 years ago

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.

dungle-scrubs commented 3 years ago

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.

luqven commented 3 years ago

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:

imgix-git-robot commented 3 years ago

:tada: This issue has been resolved in version 1.6.10 :tada:

The release is available on:

Your semantic-release bot :package::rocket: