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
Hello, I have one question. I started to use this packet, for the beginning I had created a special function Connection that permits me to get in response to the new structure of the object.
After I have created new class that I use it for type of GraphqQL response
@ObjectType()
export class CategoryConnection extends Connection<Category>(Category) {}
All is okay, because I have been getting the expected result and parameters are working excellently.
Anyway I am wondering if it is the right approach. As you can see in resolver I call method find from categoryService, that returns all records from database
In the end, as I understand, when User makes a request, service find returns all records ( getMany) and graphql return to user only neediest elements( by after and limit params). I guess that service also should get params, and take from the database only necessary records. Or am I wrong?
The text was updated successfully, but these errors were encountered:
Hello, I have one question. I started to use this packet, for the beginning I had created a special function Connection that permits me to get in response to the new structure of the object.
After I have created new class that I use it for type of GraphqQL response
Now my resolver looks that
All is okay, because I have been getting the expected result and parameters are working excellently.
Anyway I am wondering if it is the right approach. As you can see in resolver I call method find from categoryService, that returns all records from database
In the end, as I understand, when User makes a request, service find returns all records ( getMany) and graphql return to user only neediest elements( by after and limit params). I guess that service also should get params, and take from the database only necessary records. Or am I wrong?
The text was updated successfully, but these errors were encountered: