⚡️ Pro Feature ⚡️ This feature is bundled with GraphQL-Pro.

Usage

@defer is a GraphQL directive which instructs the server to execute the field in a special way:

query GetPlayerInfo($handle: String!){
  player(handle: $handle) {
    name
    # Send this field later, to avoid slowing down the initial response:
    topScore(from: 2000, to: 2020) @defer
  }
}

The directives @skip and @include are built into any GraphQL server and client, but @defer requires special attention.

Apollo-Client has experimental support but it may have some issues, so you can try this updated fork while they’re worked out.

Want to use @defer with another client? Please {open an issue or email support@graphql.pro and we’ll dig in!

Next Steps

Set up your server to support @defer.