Skip to content

Lazy load attributes of types #2066

Answered by patrick91
thomaskoller asked this question in Ideas
Discussion options

You must be logged in to vote

Hi @thomaskoller, you have two options, one is, as you said, checking the fields that have been queried, for example here: https://play.strawberry.rocks/?gist=2aa96867347be75beb2435d0c8d1c304

the other options is to use per field resolvers, like so:

https://play.strawberry.rocks/?gist=e01d4c9271d8bc780df7649fe42868fd

Also take a look at this blog post, which has some great ideas: https://andrewingram.net/posts/optimising-your-graphql-request-waterfalls/

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@thomaskoller
Comment options

Answer selected by thomaskoller
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
2 participants