diff --git a/src/Context/CurrentContext.php b/src/Context/CurrentContext.php
index a75410d..0f4d2f1 100644
--- a/src/Context/CurrentContext.php
+++ b/src/Context/CurrentContext.php
@@ -27,6 +27,13 @@ class CurrentContext {
    */
   protected $resourceType;
 
+  /**
+   * The name of the related resource.
+   *
+   * @var string
+   */
+  protected $relatedResourceName;
+
   /**
    * The current request.
    *
@@ -75,6 +82,19 @@ class CurrentContext {
     return $this->resourceType;
   }
 
+  /**
+   * Get the name of the related resource field.
+   *
+   * @return mixed|null|string
+   *   Name of the related resource.
+   */
+  public function getRelatedResourceName() {
+    if (!isset($this->relatedResourceName)) {
+      $this->relatedResourceName = $this->routeMatch->getParameter('related');
+    }
+    return $this->relatedResourceName;
+  }
+
   /**
    * Checks if the request is on a relationship.
    *
diff --git a/src/Normalizer/JsonApiDocumentTopLevelNormalizer.php b/src/Normalizer/JsonApiDocumentTopLevelNormalizer.php
index e74b26a..97f739f 100644
--- a/src/Normalizer/JsonApiDocumentTopLevelNormalizer.php
+++ b/src/Normalizer/JsonApiDocumentTopLevelNormalizer.php
@@ -166,6 +166,9 @@ class JsonApiDocumentTopLevelNormalizer extends NormalizerBase implements Denorm
     if (empty($context['resource_type'])) {
       $context['resource_type'] = $this->currentContext->getResourceType();
     }
+    if (empty($context['related'])) {
+      $context['related'] = $this->currentContext->getRelatedResourceName();
+    }
     $value_extractor = $this->buildNormalizerValue($object->getData(), $format, $context);
     if (!empty($context['cacheable_metadata'])) {
       $context['cacheable_metadata']->addCacheableDependency($value_extractor);
@@ -196,7 +199,7 @@ class JsonApiDocumentTopLevelNormalizer extends NormalizerBase implements Denorm
    */
   public function buildNormalizerValue($data, $format = NULL, array $context = []) {
     if (empty($context['expanded'])) {
-      $context += $this->expandContext($context['request'], $context['resource_type']);
+      $context += $this->expandContext($context['request'], $context['resource_type'], $context['related']);
     }
 
     if ($data instanceof EntityReferenceFieldItemListInterface) {
@@ -240,21 +243,23 @@ class JsonApiDocumentTopLevelNormalizer extends NormalizerBase implements Denorm
    *   The request to get the URL params from to expand the context.
    * @param \Drupal\jsonapi\ResourceType\ResourceType $resource_type
    *   The resource type to translate to internal fields.
+   * @param string|null $relatedResourceName
    *
    * @return array
    *   The expanded context.
    */
-  protected function expandContext(Request $request, ResourceType $resource_type) {
+  protected function expandContext(Request $request, ResourceType $resource_type, $relatedResourceName = null) {
     // Translate ALL the includes from the public field names to the internal.
     $includes = array_filter(explode(',', $request->query->get('include')));
-    $public_includes = array_map(function ($include_str) use ($resource_type) {
+    $public_includes = array_map(function ($include_str) use ($resource_type, $relatedResourceName) {
       $resolved = $this->fieldResolver->resolveInternal(
         $resource_type->getEntityTypeId(),
         $resource_type->getBundle(),
-        $include_str
+        ($relatedResourceName ? $relatedResourceName . '.' . $include_str : $include_str)
       );
       // We don't need the entity information for the includes. Clean it.
-      return preg_replace('/\.entity\./', '.', $resolved);
+      $resolved = preg_replace('/\.entity\./', '.', $resolved);
+      return $relatedResourceName ? substr_replace($resolved, '', 0, strlen($relatedResourceName) + 1) : $resolved;
     }, $includes);
     // Build the expanded context.
     $context = [
