#@defer
11 messages · Page 1 of 1 (latest)
@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 🤔
I see, thanks. I saw some people in the Relay community that had used the directive; quite surprised that even Apollo Server doesn't support it.
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)
Yes, I just came to correct it a bit, they support the syntax (https://www.apollographql.com/docs/apollo-server/workflow/requests/#incremental-delivery-experimental) but there doesn’t seem to be any mechanism in place for actually implementing the feature. At least bot documented from what I found, didn’t check the issue you linked.
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.
Nest is a framework for building efficient, scalable Node.js server-side applications. It uses progressive JavaScript, is built with TypeScript and combines elements of OOP (Object Oriented Programming), FP (Functional Programming), and FRP (Functional Reactive Programming).