#@defer

11 messages · Page 1 of 1 (latest)

twilit tundra
#

can we use @defer directive with NestJS GQL server?

wanton swift
#

@nestjs/graphql doesn't support the pre-release v17 of graphql, which brings the @defer/@stream support, so no, it's not supported yet.

I couldn't find any resources on how to implement @defer in apollo server even, so I doubt there is any production-ready library that supports that 🤔

twilit tundra
#

I guess Apollo Server 4 started supporting

#

...Apollo Server 4 supports incremental delivery directives such as @defer and @stream...

#

(or at least experimental support)

#

(just fyi, I don't use Apollo - thanks again)

wanton swift
#

Kind of similar functionality can be achieved with grpc https://docs.nestjs.com/microservices/grpc#grpc-streaming, or some workarounds with graphql subscriptions, websockets, or SSE, all of which Nest supports. Given that you mentioned relay, gql subscriptions or separate queries are probably most relevant.