thematters / matters-web

Implementation of the Matters.Town website
https://matters.town
Apache License 2.0
81 stars 25 forks source link

refact: auto-generated mergeable types #4855

Closed lizhineng closed 1 month ago

lizhineng commented 1 month ago

This PR adds a Codegen plugin that automatically generates mergeable types from the GraphQL schema. It introduces a Mergeable supertype to group these types together, eliminating the need to manually create subtypes for nested objects without identifiers. The merging behavior mirrors that of Apollo Client v2, making the migration process smoother.

vercel[bot] commented 1 month ago

@lizhineng is attempting to deploy a commit to the Matters Team on Vercel.

A member of the Team first needs to authorize it.

robertu7 commented 1 month ago

Awesome work! It's a very nice workaround. We also found this issue while reviewing PR #4829.

ref: https://medium.com/qulture-rocks-product-blog/migrating-from-apollo-client-2-to-3-9ba20783b124