-
I'm having trouble with the The Apollo docs say to use query {
me {
id
name
... @defer {
email
}
}
} When I do that Lighthouse returns an error saying "Directive "defer" may not be used on "INLINE_FRAGMENT"". directive @defer(if: Boolean = true) on FIELD Which says the defer directive can only be used on a GraphQL field. query {
me {
id
name
email @defer
}
} The response looks good but Apollo tries to parse it like a regular request and decodes it as if it were JSON. The response starts like this: Is there something missing with my setup? Do I need a special ApolloLink to handle deferred requests? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Ah I found the answer. |
Beta Was this translation helpful? Give feedback.
Ah I found the answer.
I was using the recommended upload link for handling file uploads which doesn't have support for deferred fields so I need to conditionally use the Apollo HTTP link.