Replies: 1 comment 2 replies
-
If you send a query that needs those endpoints at some point, you will get a runtime error that won’t put the gateway down. Not sure if this is confusing but we also have |
Beta Was this translation helpful? Give feedback.
-
Hi, all.
Our team is using Netflix's DGS to generate all grapqhl machinery and bind Java methods to graphql for us, so we just have a set of graphql schema files for each service from where everything else is derived and we use graphql-mesh as a means of doing a few type extensions and to present a single schema to all front end services. Works well so far.
We're discussing the best way of deploying our mesh implementation, which is completely specified in term of endpoints defined as
source.handler.endpoint
URLs in themeshrc.yaml
configuration . The graphql-mesh documentation suggests themesh build/mesh start
sequence as best deployment practice, as it allows you to create a container that can be started without concerns about the state of other services. However we found that in our case themesh build
command requires the remote endpoints to be up and running in order to generate the.mesh
folder, which makes sense since it needs to read the schema from these endpoints.So it is a kind of chicken-and-egg problem:
mesh build
requires the remote endpoint to be up, so in order to reach the point where you can do amesh start
you need the.mesh
folder that is created by themesh build
command and that can only work when your endpoints are up and running.But, if you reach the point where the endpoints are up and running, you'd be fine just by issuing then a
mesh dev
command to start your graphql-mesh and in fact you'll save yourself the complexity of bring up the dependent endpoints just to be able to run of themesh build
command, then shut them down and then start them up again to run the "real"mesh start
thing.So what's your advice for best practices deployment in the case where all endpoints are remote? Seems that simply making sure all dependencies are running and then doing a
mesh dev
is going to be simpler and of equal resilience (you'd need the services to be up in order to execute themesh build
anyway) ...Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions