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
Let's say for only one collection, sometimes I only need to retrieve certain fields from it. There are 2 possible approaches that I can think of.
Create a custom endpoint, in combination with Payload Local API. Fetch and manipulate the response on server and return.
Use GraphQL instead, to specify the fields I want to receive.
For the first approach, then performance lies in an implementation of custom endpoint, and Payload Local API speed.
For GraphQL, I don't have much experience on it, but I believe it also has certain degree of overhead. Besides, it is probably not worth using GraphQL just for one endpoint.
Have anyone gone over the same thought process, how is your experience and what is your opinion?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Let's say for only one collection, sometimes I only need to retrieve certain fields from it. There are 2 possible approaches that I can think of.
For the first approach, then performance lies in an implementation of custom endpoint, and Payload Local API speed.
For GraphQL, I don't have much experience on it, but I believe it also has certain degree of overhead. Besides, it is probably not worth using GraphQL just for one endpoint.
Have anyone gone over the same thought process, how is your experience and what is your opinion?
Beta Was this translation helpful? Give feedback.
All reactions