ApolloServer instance doesn't have appropriate @cacheControl set #6747
Unanswered
itsnotrisky
asked this question in
Q&A
Replies: 2 comments 4 replies
-
GraphQL introspection does not have a mechanism for showing the
applications of schema directives.
…On Wed, Jul 27, 2022, 11:10 PM Rizky ***@***.***> wrote:
I have my ApolloServer instance setup as follow:
const resolvers = mergeResolvers(resolversArray)const typeDefs = mergeTypeDefs(typesArray)const apollo = new ApolloServer({
cache: new BaseRedisCache({
client: redis,
}),
resolvers,
typeDefs,})
The problem is any @CacheControl directives don't show up on SDL when I
introspect from sandbox even though I can see typeDefs does output
appropriate cacheControl hint. How do I troubleshoot this?
—
Reply to this email directly, view it on GitHub
<#6747>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAECVAUUBZIQHSWFDDN5BDVWIP4HANCNFSM544AESWQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
4 replies
-
I had a try to set defaultMaxAge to a value and it did work providing
Here's the schema I have from code then translated to Traction.graphql
typeDefs output
SDL from sandbox
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have my ApolloServer instance setup as follow:
The problem is any
@cacheControl
directives don't show up on SDL Schema from sandbox where@deprecated
can be seen - thus none of query cached because the hint is not there. Also I can seetypeDefs
does output appropriate cacheControl hint to be fed to ApolloServer. How do I troubleshoot this?Beta Was this translation helpful? Give feedback.
All reactions