graphql/yoga-server/docs/features/response-caching #1951
Replies: 5 comments 8 replies
-
i created a brand new project using nestjs and graphql Yoga following the steps here https://www.the-guild.dev/graphql/yoga-server/v3/integrations/integration-with-nestjs and all thinks works great ☺☺ {
"data": null,
"errors": [
{
"message": "setResult is not a function"
}
]
} if i remove the caching all things works great again GraphQLModule.forRoot<YogaDriverConfig>({
driver: YogaDriver,
autoSchemaFile: true,
transformSchema: schema => upperDirectiveTransformer(schema, 'upper'),
installSubscriptionHandlers: true,
plugins: [
useResponseCache({session: () => null, ttl: 10000})
],
buildSchemaOptions: {
directives: [
new GraphQLDirective({
name: 'upper',
locations: [DirectiveLocation.FIELD_DEFINITION],
}),
],
},
}) |
Beta Was this translation helpful? Give feedback.
-
I'm trying to figure out how to deal with This is my response:
How would I go about setting a TTL of, say 15 seconds, for a query that returns |
Beta Was this translation helpful? Give feedback.
-
https://the-guild.dev/graphql/yoga-server/docs/features/response-caching#session-based-caching It says here that the object passed is of type Request However, the TS Autocomplete says it is of type YogaInitialContext, therefore, I cannot access the request headers. |
Beta Was this translation helpful? Give feedback.
-
I encountered a problem while working with Using Schema directive @cacheControl
|
Beta Was this translation helpful? Give feedback.
-
While we are using graphql-yoga for our service. when we implemented few queries and schemas defines. if any value in requested input has syntax error it is returning unexpected error due UseHttpValidationError.js function it is checking for extension object but for syntax error it will not have that object and same case is happening for requested field syntax error then also it is checking for extension object in response it is checking in regular.js. could you please check this bug and let us know the fix |
Beta Was this translation helpful? Give feedback.
-
graphql/yoga-server/docs/features/response-caching
GraphQL Yoga: documentation
https://www.the-guild.dev/graphql/yoga-server/docs/features/response-caching
Beta Was this translation helpful? Give feedback.
All reactions