protected function getRelationshipsThatMatchType($type)
    {
        return array_filter(
            $this->mapRelationshipsToIdAndData(),
            function ($relationship) use ($type) {
                $relationshipType = Arr::get($relationship, 'type');

                return Str::snakeCase($type) === Str::snakeCase($relationshipType);
            }
        );
    }