Man this was super cool. No need to write GraphQL queries for all the operations again when you already have written the code for services. Just combine the results and show. WOW...!!
Thats a good question. The behaviour generally depends on the serverside graphql library you are using. Most implementations usually return the response of the services that were queried successfully along with an array of errors one for each query which has failed. There is no easy way to return custom error codes however. Thats a graphql weak spot. But there is a way to extend the errors to add some custom fields if I'm not wrong.
Also one question, as the documentation said this platform will not work on production for some of the features. Don't you think this is some kind of blockage. And no one can use it live. If we want to setup it on production then what are the ways there? So I think for that we need to have VM and the setup mentioned in the documentation could be worked there, right? Please give some inputs to how we can use it on production, if we can properly.
SpaceCloud is production ready and is being actively used by several customers. For new projects, consider using hasura or supabase since SpaceCloud is currently in maintenance mode.
Will this not make graphql a single point of failure for your app? We tried to reduce single point of failure by moving to Microservices but then if add layer of graphql will that not add complexity?
GraphQL is just a data access layer and is mostly stateless. Its akin to a BFF layer or aggregation service you may have. So the real question is, do you want to implement such frontend specific aggregations in each microservice? Or do you want to delegate that responsibility to another layer.
Fantastic stuff! I love the content and the way that you present it! Thank you for contributing more architectural level content to RUclips!
Big fan of your content as well! Thanks for the support!
Man this was super cool. No need to write GraphQL queries for all the operations again when you already have written the code for services. Just combine the results and show. WOW...!!
Ikr! Its almost magical!
Great Video TechBud.Kudos
Glad you liked it!
Very nice explaination! just subscribed🤛
Thanks! Glad you liked it.
I'd like to know more about error handling, for example when one of the two services that is queried and joined by graphql is unavailable. Thank you!
Thats a good question. The behaviour generally depends on the serverside graphql library you are using. Most implementations usually return the response of the services that were queried successfully along with an array of errors one for each query which has failed. There is no easy way to return custom error codes however. Thats a graphql weak spot. But there is a way to extend the errors to add some custom fields if I'm not wrong.
Also one question, as the documentation said this platform will not work on production for some of the features. Don't you think this is some kind of blockage. And no one can use it live. If we want to setup it on production then what are the ways there? So I think for that we need to have VM and the setup mentioned in the documentation could be worked there, right? Please give some inputs to how we can use it on production, if we can properly.
SpaceCloud is production ready and is being actively used by several customers.
For new projects, consider using hasura or supabase since SpaceCloud is currently in maintenance mode.
Will this not make graphql a single point of failure for your app? We tried to reduce single point of failure by moving to Microservices but then if add layer of graphql will that not add complexity?
GraphQL is just a data access layer and is mostly stateless. Its akin to a BFF layer or aggregation service you may have.
So the real question is, do you want to implement such frontend specific aggregations in each microservice? Or do you want to delegate that responsibility to another layer.
Mind blowing stuff
Glad you liked it