Skip to content

Commit

Permalink
chore(docs/core): 2024-12-16 15:23:55
Browse files Browse the repository at this point in the history
Affected files:
content/Projects/GC/API Reference/Interacting with generated services.md
  • Loading branch information
zakhaev26 committed Dec 16, 2024
1 parent 507677f commit 4593983
Showing 1 changed file with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,35 @@ The query options and filters provide a powerful and flexible way to control how
In addition to these core query options, there are several **InternalQueryOptions** that provide more advanced filtering and querying capabilities:

Learn about all the currently supported options [here](https://github.com/p-society/gc-broadcast/blob/dev/src/types/QueryOptions.d.ts).

# Examples

So lets say i generated a userService using the generate scripts (using yarn generate users)
so now, i can query the users API using query parameters to get desired results!


for example, if my schema looks something like:

<a schema of users>


and i want to query to all latest users created in the application.

usually, a dev have to create a separate route, something like findUsersLatest() . but with this architecture, we can simple query and get results.

eg: http://localhost:3000/users?$sort[createdAt]=-1

thats it!


if i want to populate the fields that refer to another collection, forexample
if my use









0 comments on commit 4593983

Please sign in to comment.