powerhouse-inc / powerhouse

0 stars 0 forks source link

Make servicer runner prototype part of the reactor in connect. #379

Open CallmeT-ty opened 2 weeks ago

CallmeT-ty commented 2 weeks ago

Document model change should auto reload document models in switchboard. Graphql Service runner that adds the graphql api, run it on the IDE, synchronise it with Connect. Did we have similar implementation in connect?

there is a graphql export utils.

CallmeT-ty commented 5 days ago

A small node server ... that offers a graphql service. Enables Connect to add a remote drive and further subgraphs. e.g. Search/ General documetn indexer or other query stuff.

Goal 1: GraphQL API: If we make the graphql api available in local environment (service runner or whatever structure). When we define new Doc & new document. Would the subgraph become available in the api endpoint? https://github.com/powerhouse-inc/powerhouse/issues/292 => Goal is to run the reactor API with the graphQL endpoint. We could connect connect with the reactor through a default drive. Potentially to be accomplished by end of week. Acaldas formulated it as 'Reactor local packag' => instantiation of a local drive with file storage adapter which starts the graphQL server.

How does plugging in a new subgraph work? It listens and functions as a readmodel that replaces the subgraph? If document models change in the reactor, e.g. new document model. Graphql server needs to reload the schema and update the types. To make the new types available in the documentquery we'll need to reload the type definition. On the other hand, the subgraphs or readmodels

Subgraph is being dynamically created, e.g. schema gets updated. How does it work when there are no graphql ... attached to it.

You start with types without mutations A subgraph gets defined with some queries & mutations Document models get downloaded, listener looks for changes in the router. Next load all subgraphs, load their schema, load an apollo server A small helper is put in place.

How do we plug in the GraphQL into the demo scenario?