Is it currently possible in Gatsby to build reusable components that have their own graphql query? If not, currently what is the least "coupled" way to pass data to reusable components? I can't seem to find any examples that do this and I can't find anything in the documentation.
Say, for example, you want to make a tag cloud component for a blog that would show up in the side bar of all "post" pages as well as on a single "/tag-cloud" page. You could use like <TagCloud limit={20} /> or <TagCloud tags={uniqueTags} />. For this, you would need to query all edges, map-reduce/extract each tags array down to a unique, ordered set of unique tag strings.
Or, say you wanted an "other products" component for a catalog page that excludes the current product. Here, you might have <ProductsList exclude={currentProduct} />. This would be a straight-forward filtered query at build-time.
The only way I can see doing this is either to monkey-patch the query results from createPages() or to pass data through context in createPage({path, component, context}). Should this take place in gatsby-node.js? Are there any other ways?