gatsbyjs / wp-gatsby

WordPress plugin for gatsby-source-wordpress
Other
167 stars 41 forks source link

Unable to start dev with cache when installing WooGraphQL #254

Open KryptonumDev opened 1 year ago

KryptonumDev commented 1 year ago

After installing the Woographql plugin, dev builds stop working with the cache. after gatsby clean project works again until rebuild or change in WP.

Reproduction Link https://github.com/GleckoS/woographlq-bug

Steps to Reproduce Install gatsby-source-wordpress Install Wp with woocommerce and woographql Add some products in woocommerce Start dev second time ( Everything works right the first time )

Result of yarn start

ERROR #gatsby-source-wordpress_112004  PLUGIN

 gatsby-source-wordpress  The remote WPGraphQL schema hasn't changed but local generated type definitions have. This is a bug, please open an issue on Github and include the following text..

Changed type defs:

Typename WpCartToCartItemConnectionType diff:
 {
   kind: "OBJECT"
   config: {
     name: "WpCartToCartItemConnectionType"
     fields: {
       itemCount: {
         type: "Int"
         description: "Total number of items in the cart."
       }
       nodes: {
         type: "[WpCartItem!]!"
         description: "The nodes of the connection, without the edges"
       }
       pageInfo: {
         type: "WpCartToCartItemConnectionPageInfoType!"
         description: "Information about pagination in a connection."
       }
       productCount: {
         type: "Int"
         description: "Total number of different products in the cart"
       }
     }
     description: "Connection between the Cart type and the CartItem type"
     extensions: {
       infer: false
     }
     interfaces: [
+      "WpCartItemConnectionType"
       "WpConnectionType"
     ]
   }
 }

Typename WpCartItemConnectionType diff:
+{
+  kind: "INTERFACE"
+  config: {
+    name: "WpCartItemConnectionType"
+    fields: {
+      nodes: {
+        type: "[WpCartItem!]!"
+        description: "A list of connected CartItem Nodes"
+      }
+      pageInfo: {
+        type: "WpCartItemConnectionPageInfoType!"
+        description: "Information about pagination in a connection."
+      }
+    }
+    extensions: {
+      infer: false
+    }
+    interfaces: [
+      "WpConnectionType"
+    ]
+  }
+}

Typename WpCartItemConnectionEdgeType diff:
+{
+  kind: "INTERFACE"
+  config: {
+    name: "WpCartItemConnectionEdgeType"
+    fields: {
+      node: {
+        type: "WpCartItem!"
+        description: "The connected CartItem Node"
+      }
+    }
+    extensions: {
+      infer: false
+    }
+    interfaces: [
+      "WpEdgeType"
+    ]
+  }
+}

Typename WpProductToProductAttributeConnectionType diff:
 {
   kind: "OBJECT"
   config: {
     name: "WpProductToProductAttributeConnectionType"
     fields: {
       nodes: {
         type: "[WpProductAttribute!]!"
         description: "The nodes of the connection, without the edges"
       }
       pageInfo: {
         type: "WpProductToProductAttributeConnectionPageInfoType!"
         description: "Information about pagination in a connection."
       }
     }
     description: "Connection between the Product type and the ProductAttribute type"
     extensions: {
       infer: false
     }
     interfaces: [
+      "WpProductAttributeConnectionType"
       "WpConnectionType"
     ]
   }
 }

Typename WpProductAttributeConnectionType diff:
+{
+  kind: "INTERFACE"
+  config: {
+    name: "WpProductAttributeConnectionType"
+    fields: {
+      nodes: {
+        type: "[WpProductAttribute!]!"
+        description: "A list of connected ProductAttribute Nodes"
+      }
+      pageInfo: {
+        type: "WpProductAttributeConnectionPageInfoType!"
+        description: "Information about pagination in a connection."
+      }
+    }
+    extensions: {
+      infer: false
+    }
+    interfaces: [
+      "WpConnectionType"
+    ]
+  }
+}

Typename WpProductAttributeConnectionEdgeType diff:
+{
+  kind: "INTERFACE"
+  config: {
+    name: "WpProductAttributeConnectionEdgeType"
+    fields: {
+      node: {
+        type: "WpProductAttribute!"
+        description: "The connected ProductAttribute Node"
+      }
+    }
+    extensions: {
+      infer: false
+    }
+    interfaces: [
+      "WpEdgeType"
+    ]
+  }
+}

Typename WpProductToGlobalProductAttributeConnectionType diff:
 {
   kind: "OBJECT"
   config: {
     name: "WpProductToGlobalProductAttributeConnectionType"
     fields: {
       nodes: {
         type: "[WpGlobalProductAttribute!]!"
         description: "The nodes of the connection, without the edges"
       }
       pageInfo: {
         type: "WpProductToGlobalProductAttributeConnectionPageInfoType!"
         description: "Information about pagination in a connection."
       }
     }
     description: "Connection between the Product type and the GlobalProductAttribute typ

...
[Diff exceeded 5000 characters and was truncated]

not finished createSchemaCustomization - 2.492s

error Command failed with exit code 1.

Gatsby Environment

System:
    OS: Windows 10 10.0.19045
    CPU: (6) x64 Intel(R) Core(TM) i5-9400F CPU @ 2.90GHz
  Binaries:
    Node: 18.12.1 - ~\AppData\Local\Temp\yarn--1692790599792-0.8315381333770957\node.CMD
    Yarn: 1.22.18 - ~\AppData\Local\Temp\yarn--1692790599792-0.8315381333770957\yarn.CMD
    npm: 8.19.2 - C:\Program Files\nodejs\npm.CMD
  Languages:
    Python: 3.10.4 - /c/Python310/python
  Browsers:
    Edge: Spartan (44.19041.1266.0), Chromium (115.0.1901.203)
  npmPackages:
    gatsby: ^5.11.0 => 5.11.0
    gatsby-plugin-image: ^3.11.0 => 3.11.0
    gatsby-plugin-sharp: ^5.11.0 => 5.11.0
    gatsby-source-wordpress: ^7.11.0 => 7.11.0
    gatsby-transformer-sharp: ^5.11.0 => 5.11.0

WP Environment

  WordPress@6.3
  WooCommerce@8.0.2
  WP-Gatsby@2.3.3
  WPGraphQL@1.15.0
  WPGraphQL WooCommerce (WooGraphQL)@0.15.0