r2d2 Posted December 24, 2020 Report Posted December 24, 2020 8 minutes ago, sri_india said: Google chesthy chala info vosthadi kdha ... but still pani pata lekundaa kaaligaa unna , so type chesthaaa REST API - you make call to endpoint and get the response , lets say you get one employee info , now you need payroll info of same employee , you need to make other API call ,and you also need his timesheets info other API call and so forth .... too many API calls for each info and also you might not need all the info like you need only employee name but not joining date or payroll - salary but not payroll dates ..... it is not easy to omit this info in REST API calls using graphQL , you specify you schema as graph and now you can make single API call to get all employee info , payroll info , timesheet or whatever you want , and also you can get specific fields you requested for instead of all the fields available Good.. so this is sort of a middleware between the fronted and backend..? Quote
sri_india Posted December 24, 2020 Report Posted December 24, 2020 1 minute ago, r2d2 said: Good.. so this is sort of a middleware between the fronted and backend..? it is backend , it replace REST /SOAP APIs .... Quote
r2d2 Posted December 24, 2020 Report Posted December 24, 2020 1 minute ago, sri_india said: it is backend , it replace REST /SOAP APIs .... Ok .. will start digging.. helps if we are building new applications.. Quote
vatsayana Posted December 24, 2020 Report Posted December 24, 2020 mana gurinchi mana kanna Google ke ekkuva thelusu koncham ela vadalo instructions ivvandi baa, try chesta, naa gurinchi nenu thelusukunta 1 Quote
Spartan Posted December 25, 2020 Report Posted December 25, 2020 1 hour ago, JAMBALHOT_RAJA said: We just started using this in our project, for better performance caching mechanism undali @JAMBALHOT_RAJA yes caching is important role here. but designing phase lo resolvers sarigga breakdown cheyadam is also important... vadtunnam kada ani vadeste..mottam design kottestadi if u r a newbie Quote
Spartan Posted December 25, 2020 Report Posted December 25, 2020 20 minutes ago, r2d2 said: Good.. so this is sort of a middleware between the fronted and backend..? @r2d2 REST CALL ki standard required input iste ne respond avutadi.. GraphQL is always a POST method, and input payload can vary (given it follows the schema) . @sri_india ichina example lo single call lo u can query for o ly Employye info and ID.. or employee info, ID, payroll, and Manager... same single call, but request payload varies, so graphql schema fetches and stitches the response for u. 1 Quote
Spartan Posted December 25, 2020 Report Posted December 25, 2020 Appollo is a standaerd one, but chala drawbacks unnai..it doesnt handle file upload. Express handle chestadi file uploads, just for this we had to break our design into two. data anta Appollo , Files anni Express but still working great. October lo live vellindi project Quote
Spartan Posted December 25, 2020 Report Posted December 25, 2020 AWS AppSync is the out of box, Graphql service from AWS. backend lo vadu kuda Appolo vadtunnadu. release chesinappudu only VTIL lang support unde, now he is supporting all schema definitions...open up ayyadu competition tattukoleka.. may be we will move to Appsync if more features are improved. Quote
JAMBALHOT_RAJA Posted December 25, 2020 Report Posted December 25, 2020 2 minutes ago, Spartan said: @JAMBALHOT_RAJA yes caching is important role here. but designing phase lo resolvers sarigga breakdown cheyadam is also important... vadtunnam kada ani vadeste..mottam design kottestadi if u r a newbie @Spartan You are right, asalu GraphQL ma project ki avasaram ledu, okadu team lo ma manager mundu hadavidi cheyataniki kotha technologies & tools thiskostadu avi ma use case ki avasaram unna lekapoyina vadamantadu manager. Prod lo ye issues lekunda manchi response times unna apis run avutunay, ippudu we need to add GraphQL layer on top of it and it should not alter response times 🤦 2 Quote
Pichkaari Posted December 25, 2020 Report Posted December 25, 2020 16 minutes ago, JAMBALHOT_RAJA said: @Spartan You are right, asalu GraphQL ma project ki avasaram ledu, okadu team lo ma manager mundu hadavidi cheyataniki kotha technologies & tools thiskostadu avi ma use case ki avasaram unna lekapoyina vadamantadu manager. Prod lo ye issues lekunda manchi response times unna apis run avutunay, ippudu we need to add GraphQL layer on top of it and it should not alter response times 🤦 How do yoy refactor the existing resources man? I still need to watch the tutorials but just curious.. Lets say I have an RESTful /employee resource and it has 3 end points.. /info ../payroll ../timesheets .. In current world UI/client makes 3 diff requests to fetch employee data. But in GraphQL world, how do you refactor this pattern to add GraphQL layer on top of this? Client directly calls just /employee resource with some request object and GraphQL consolidates the responses from all three endpoints and return as requested? Quote
Pichkaari Posted December 25, 2020 Report Posted December 25, 2020 @Spartan Why caching is important here? what are the bottlenecks if we don't use caching particularly for GraphQL.. I mean caching depends on our use case kada, but why GraphQL ki caching mandatory? Quote
r2d2 Posted December 25, 2020 Report Posted December 25, 2020 @ymovies: pl pin this thread... very useful and interesting posts .. knowledge sharing should be encouraged! 1 Quote
JAMBALHOT_RAJA Posted December 25, 2020 Report Posted December 25, 2020 7 minutes ago, Pichkaari said: How do yoy refactor the existing resources man? I still need to watch the tutorials but just curious.. Lets say I have an RESTful /employee resource and it has 3 end points.. /info ../payroll ../timesheets .. In current world UI/client makes 3 diff requests to fetch employee data. But in GraphQL world, how do you refactor this pattern to add GraphQL layer on top of this? Client directly calls just /employee resource with some request object and GraphQL consolidates the responses from all three endpoints and return as requested? Yes you need to make 3 different rest calls, client would make only one call to GraphQL and we need to consolidate responses from multiple endpoints and return to client as one response. You should definitely implement caching mechanism for better performance. Quote
Pichkaari Posted December 25, 2020 Report Posted December 25, 2020 2 minutes ago, JAMBALHOT_RAJA said: Yes you need to make 3 different rest calls, client would make only one call to GraphQL and we need to consolidate responses from multiple endpoints and return to client as one response. You should definitely implement caching mechanism for better performance. Why? Is it because, it has to pull the information from the data sources for all 3 end points at once? I'm concerned about this approach, obviously I have to dig in more kaani.. lets say if we have a greedy client and it wants to fetch data from 7 endpoints at once, dont you think this results in a timeout if one of the endpoint takes more time to fetch data from its data source? Sorry I'm just thinking through the edge cases. Quote
Amrita Posted December 25, 2020 Report Posted December 25, 2020 42 minutes ago, Spartan said: @r2d2 REST CALL ki standard required input iste ne respond avutadi.. GraphQL is always a POST method, and input payload can vary (given it follows the schema) . @sri_india ichina example lo single call lo u can query for o ly Employye info and ID.. or employee info, ID, payroll, and Manager... same single call, but request payload varies, so graphql schema fetches and stitches the response for u. Not really . You can use a GET with GraphQL with mutation operation. Most servers allows that unless you design ur server to reject GET with mutation operations and allow only POST. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.