Use with Apollo Server Cache #1136
Replies: 2 comments 4 replies
-
Are you running into specific issues? the |
Beta Was this translation helpful? Give feedback.
-
@hayes I'm looking for some clarity on how Pothos actually works, because I believe it takes the Graphql Query itself and uses includes/selects to compile one query that Prisma sends off to the database. So if this is the case, is it impossible to cache a specific type/id? because it'd be too late-- the query details have already been included in the top level prisma call-- so even if you have a certain user or post cached already, it will be fetched from the database either way. Maybe this is showing a fundamental misunderstanding of how Pothos and/or GraphQL queries are processed, but I'd love to hear your thoughts. |
Beta Was this translation helpful? Give feedback.
-
Hi @hayes -- first off. Thank you for building this framework, it's incredible.
I'm really struggling to understand how one would go about integrating server level caching with Pothos builders & resolvers.
Would you be able to help here and perhaps provide a concise example or two of how I'd go about caching certain fields using
info.cacheControl.setCacheHint
?Beta Was this translation helpful? Give feedback.
All reactions