graphql-client icon indicating copy to clipboard operation
graphql-client copied to clipboard

Add example for type refining fragment

Open nirvdrum opened this issue 5 years ago • 1 comments

PR #181 added support for type refining fragments and was released in version 0.6.0. The existing examples, however, were not augmented to demonstrate how to work with such a fragment. I managed to piece it together from the newly added tests and some println! debugging. It wasn't immediately clear to me that a new enum would be generated and that I would need to pattern-match on that.

I could take a crack at it. It looks to me like working off the GitHub example would be easiest since it's publicly accessible.

nirvdrum avatar Oct 09 '20 21:10 nirvdrum

Yep that would be great. I think we do have tests for this, that could be a starting point.

tomhoule avatar Jun 25 '21 09:06 tomhoule