Jump to content

Google yourself using OSINT Framework.


ShruteSastry

Recommended Posts

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..?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

  • Upvote 1
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 🤦

  • Upvote 2
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...