You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes when you want to develop locally it makes sense that you want to use the latest valid schema version on CDN, but replace some of the services locally because you develop locally.
The command should allow you to generate the supergraph and/or SDL locally (aka artifacts you would pass to a graphql gateway you run locally).
E.g. the following example would watch/poll htttp://localhost:3000/graphql, use the Hive GraphQL API for doing composition then write it to the supergraph.sdl file. If there was already a users service within the registry on GraphQL Hive it would be completely replaced by the local service.
hive dev --watch --service users --url http://localhost:3000/graphql --out supergraph.sdl
If you want to replace multiple services locally you could just pass more parameters:
After each successful composition we could send a system push notification and/or display the changes on the CLI. 🤔
Note: We cannot do the composition locally as users could configure a wide range of custom external composition services. because of that we always need to do the composition through the API. In order to reduce the amount of network calls we can always check whether our local schemas have changed before doing the call.
Note: We cannot serve a gateway ourselves, as we don't know what composition type is used. We can only generate the artifact and write it to a file. Users are then advised to use their gateway of choice for consuming/watching that file.
The text was updated successfully, but these errors were encountered:
Sometimes when you want to develop locally it makes sense that you want to use the latest valid schema version on CDN, but replace some of the services locally because you develop locally.
The command should allow you to generate the supergraph and/or SDL locally (aka artifacts you would pass to a graphql gateway you run locally).
E.g. the following example would watch/poll
htttp://localhost:3000/graphql
, use the Hive GraphQL API for doing composition then write it to thesupergraph.sdl
file. If there was already ausers
service within the registry on GraphQL Hive it would be completely replaced by the local service.If you want to replace multiple services locally you could just pass more parameters:
After each successful composition we could send a system push notification and/or display the changes on the CLI. 🤔
Note: We cannot do the composition locally as users could configure a wide range of custom external composition services. because of that we always need to do the composition through the API. In order to reduce the amount of network calls we can always check whether our local schemas have changed before doing the call.
Note: We cannot serve a gateway ourselves, as we don't know what composition type is used. We can only generate the artifact and write it to a file. Users are then advised to use their gateway of choice for consuming/watching that file.
The text was updated successfully, but these errors were encountered: