captbaritone / grats

Implementation-First GraphQL for TypeScript
https://grats.capt.dev
MIT License
308 stars 16 forks source link

Propagate interface fields #120

Open captbaritone opened 8 months ago

captbaritone commented 8 months ago

This PR changes how interface fields are handled. Previously, each interface implementor was responsible for adding /** @gqlField */ to each field. Even those which were already annotated on one of the interfaces it implements. This was tedious.

The one exception was fields defined with functions on interfaces. Here we would try to propagate the implementation to all implementors. However, there was a bug where we did not propagate the field to transitive implementors.

This PR addresses both issues by automatically propagating all fields to all implementors (including transitive implementors). If an implementor provides its own implementation of a field, the more specific implementation will be used.

netlify[bot] commented 8 months ago

Deploy Preview for grats ready!

Name Link
Latest commit 5b25f5650030b8d6273a87266300fa576082c6ed
Latest deploy log https://app.netlify.com/sites/grats/deploys/65e54597459a38000830fa6c
Deploy Preview https://deploy-preview-120--grats.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.