[DNM] Demoing Gatsby Union functionality #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This site is a simple visual list of sqaures and circles for the purpose of spiking some gatsby union functionality type stuff. This PR uses a proposed extension API on gatsby to specify a GrapqlUnion allowing the user to query (and in future sort, filter, page) multiple types at the same time, which would be dreamy.
CMS is contentful and it has some squares and some circles. Squares have a sideLength and Circles have a radius. Area is calculated locally and added to nodes using
onCreateNode
APICredit to Clay Allsopp for this article which was a big help https://medium.com/the-graphqlhub/graphql-tour-interfaces-and-unions-7dd5be35de0d