Skip to content

Commit 43193bc

Browse files
idalithbbenface
andauthored
Update website/pages/en/querying/querying-best-practices.mdx
Co-authored-by: Benoît Rouleau <[email protected]>
1 parent 0793a91 commit 43193bc

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

website/pages/en/querying/querying-best-practices.mdx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,7 @@ GraphQL became famous for its "Ask for what you want" tagline.
196196
For this reason, there is no way, in GraphQL, to get all available fields without having to list them individually.
197197

198198
- When querying GraphQL APIs, always think of querying only the fields that will be actually used.
199-
- A common cause of over-fetching is collections of entities. By default, queries will fetch 100 entities in a collection, which is usually much more than what will actually be used, e.g., for display to the user.
200-
- Queries should always be set first explicitly.
201-
- Make sure queries only fetch as many entities as they actually need. This applies not just to top-level collections in a query, but even more so to nested collections of entities.
199+
- Make sure queries only fetch as many entities as you actually need. By default, queries will fetch 100 entities in a collection, which is usually much more than what will actually be used, e.g., for display to the user. This applies not just to top-level collections in a query, but even more so to nested collections of entities.
202200

203201
For example, in the following query:
204202

0 commit comments

Comments
 (0)