building-envelope-data / database

Reference implementation of a product data server as part of the product data network buildingenvelopedata.org
MIT License
0 stars 0 forks source link

Use multiple GraphQL schemata with different endpoints #5

Open simon-wacker opened 3 years ago

simon-wacker commented 3 years ago

This works in Apollo as explained in Using Apollo with multiple Graphql endpoints. Is there a way to make it work with graphql-let?

Alternatively, we may use distributed schemata via schema stitching as detailed on https://chillicream.com/docs/hotchocolate/distributed-schema or just add additional queries and mutations to the database GraphQL endpoint that do nothing but redirect to the metabase GraphQL endpoint. I tried to do that in https://github.com/building-envelope-data/database/commit/b49eada672be337d0940afdfcdb334c608e098d8 and failed because as of this writing schema stitching does not support custom scalars yet. Wherever there is an identifier to some type in the metabase it should be possible to query details about the type directly, for example, where there is componentId, there should be component of type Component.