Commit b5dc272b authored by Robert Speicher's avatar Robert Speicher

Merge branch 'kassio/bulkimports-rename-end-cursor-to-next-page' into 'master'

BulkImports: Rename "end_cursor" to "next_page"

See merge request gitlab-org/gitlab!57503
parents d5eb2bad d9aa3605
......@@ -14,7 +14,7 @@ module EE
epic(iid: $epic_iid) {
award_emoji: awardEmoji(first: 100, after: $cursor) {
page_info: pageInfo {
end_cursor: endCursor
next_page: endCursor
has_next_page: hasNextPage
}
nodes {
......
......@@ -14,7 +14,7 @@ module EE
epic(iid: $epic_iid) {
events(first: 100, after: $cursor) {
page_info: pageInfo {
end_cursor: endCursor
next_page: endCursor
has_next_page: hasNextPage
}
nodes {
......
......@@ -17,7 +17,7 @@ module EE
after: $cursor
) {
page_info: pageInfo {
end_cursor: endCursor
next_page: endCursor
has_next_page: hasNextPage
}
nodes {
......
......@@ -13,7 +13,7 @@ module EE
group(fullPath: $full_path) {
iterations(first: 100, after: $cursor, includeAncestors: false) {
page_info: pageInfo {
end_cursor: endCursor
next_page: endCursor
has_next_page: hasNextPage
}
nodes {
......
......@@ -125,7 +125,7 @@ RSpec.describe EE::BulkImports::Groups::Pipelines::EpicAwardEmojiPipeline do
page_info = {
'has_next_page' => has_next_page,
'end_cursor' => has_next_page ? 'cursor' : nil
'next_page' => has_next_page ? 'cursor' : nil
}
BulkImports::Pipeline::ExtractedData.new(data: data, page_info: page_info)
......
......@@ -171,7 +171,7 @@ RSpec.describe EE::BulkImports::Groups::Pipelines::EpicEventsPipeline do
page_info = {
'has_next_page' => has_next_page,
'end_cursor' => has_next_page ? 'cursor' : nil
'next_page' => has_next_page ? 'cursor' : nil
}
BulkImports::Pipeline::ExtractedData.new(
......
......@@ -146,7 +146,7 @@ RSpec.describe EE::BulkImports::Groups::Pipelines::EpicsPipeline, :clean_gitlab_
page_info = {
'has_next_page' => has_next_page,
'end_cursor' => has_next_page ? 'cursor' : nil
'next_page' => has_next_page ? 'cursor' : nil
}
BulkImports::Pipeline::ExtractedData.new(data: data, page_info: page_info)
......
......@@ -112,7 +112,7 @@ RSpec.describe EE::BulkImports::Groups::Pipelines::IterationsPipeline do
def extracted_data(title:, start_date: Date.today, has_next_page: false)
page_info = {
'has_next_page' => has_next_page,
'end_cursor' => has_next_page ? 'cursor' : nil
'next_page' => has_next_page ? 'cursor' : nil
}
BulkImports::Pipeline::ExtractedData.new(
......
......@@ -12,7 +12,7 @@ module BulkImports
group(fullPath: $full_path) {
labels(first: 100, after: $cursor, onlyGroupLabels: true) {
page_info: pageInfo {
end_cursor: endCursor
next_page: endCursor
has_next_page: hasNextPage
}
nodes {
......
......@@ -11,7 +11,7 @@ module BulkImports
group(fullPath: $full_path) {
group_members: groupMembers(relations: DIRECT, first: 100, after: $cursor) {
page_info: pageInfo {
end_cursor: endCursor
next_page: endCursor
has_next_page: hasNextPage
}
nodes {
......
......@@ -12,7 +12,7 @@ module BulkImports
group(fullPath: $full_path) {
milestones(first: 100, after: $cursor, includeDescendants: false) {
page_info: pageInfo {
end_cursor: endCursor
next_page: endCursor
has_next_page: hasNextPage
}
nodes {
......
......@@ -18,7 +18,7 @@ module BulkImports
end
def next_page
@page_info&.dig('end_cursor')
@page_info&.dig('next_page')
end
def each(&block)
......
......@@ -94,7 +94,7 @@ RSpec.describe BulkImports::Groups::Pipelines::LabelsPipeline do
def extracted_data(title:, has_next_page: false)
page_info = {
'has_next_page' => has_next_page,
'end_cursor' => has_next_page ? 'cursor' : nil
'next_page' => has_next_page ? 'cursor' : nil
}
BulkImports::Pipeline::ExtractedData.new(data: [label_data(title)], page_info: page_info)
......
......@@ -103,7 +103,7 @@ RSpec.describe BulkImports::Groups::Pipelines::MembersPipeline do
page_info = {
'has_next_page' => has_next_page,
'end_cursor' => has_next_page ? 'cursor' : nil
'next_page' => has_next_page ? 'cursor' : nil
}
BulkImports::Pipeline::ExtractedData.new(data: data, page_info: page_info)
......
......@@ -111,7 +111,7 @@ RSpec.describe BulkImports::Groups::Pipelines::MilestonesPipeline do
def extracted_data(title:, has_next_page: false)
page_info = {
'has_next_page' => has_next_page,
'end_cursor' => has_next_page ? 'cursor' : nil
'next_page' => has_next_page ? 'cursor' : nil
}
BulkImports::Pipeline::ExtractedData.new(
......
......@@ -9,7 +9,7 @@ RSpec.describe BulkImports::Pipeline::ExtractedData do
let(:page_info) do
{
'has_next_page' => has_next_page,
'end_cursor' => cursor
'next_page' => cursor
}
end
......
......@@ -245,7 +245,7 @@ RSpec.describe BulkImports::Pipeline::Runner do
data: { foo: :bar },
page_info: {
'has_next_page' => has_next_page,
'end_cursor' => has_next_page ? 'cursor' : nil
'next_page' => has_next_page ? 'cursor' : nil
}
)
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment