style: auto format

This commit is contained in:
github-actions[bot]
2026-03-25 10:35:56 +00:00
parent 79a525cbd3
commit 6e134d32d5
11 changed files with 1813 additions and 1787 deletions
+315 -329
View File
@@ -1,349 +1,335 @@
export const pageByNavigationPathQuery = /* GraphQL */ `query pageByNavigationPath(
$input: PageByNavigationPathInput!
$firstStories: Int
$afterStories: Cursor
) {
pageByNavigationPath(input: $input) {
error {
message
type {
class
... on ErrorTypeInvalidRequest {
fields {
field
message
export const pageByNavigationPathQuery = /* GraphQL */ `
query pageByNavigationPath($input: PageByNavigationPathInput!, $firstStories: Int, $afterStories: Cursor) {
pageByNavigationPath(input: $input) {
error {
message
type {
class
... on ErrorTypeInvalidRequest {
fields {
field
message
}
}
}
}
}
page {
ads {
suppress
}
description
id
latestStoriesConnection(first: $firstStories, after: $afterStories) {
edges {
node {
byline {
...AssetBylineFragment
}
headlines {
headline
}
ads {
sponsor {
name
}
}
overview {
about
label
}
type
dates {
firstPublished
published
}
id
publicId
images {
...AssetImagesFragmentAudience
}
tags {
primary {
...TagFragmentAudience
}
secondary {
...TagFragmentAudience
}
}
urls {
...AssetUrlsAudienceFragment
}
}
}
pageInfo {
endCursor
hasNextPage
}
}
name
seo {
canonical {
brand {
key
}
}
description
title
}
social {
image {
height
url
width
}
}
}
redirect
}
}
page {
ads {
suppress
}
fragment AssetBylineFragment on AssetByline {
type
... on AssetBylineAuthor {
author {
name
publicId
profile {
avatar
bio
body
canonical {
brand {
key
}
}
email
socials {
facebook {
publicId
}
twitter {
publicId
}
}
title
}
}
}
... on AssetBylineName {
name
}
}
fragment AssetImagesFragmentAudience on ImageRenditions {
landscape16x9 {
...ImageFragmentAudience
}
landscape3x2 {
...ImageFragmentAudience
}
portrait2x3 {
...ImageFragmentAudience
}
square1x1 {
...ImageFragmentAudience
}
}
fragment ImageFragmentAudience on ImageRendition {
altText
animated
caption
credit
crop {
offsetX
offsetY
width
zoom
}
mediaId
mimeType
source
type
}
fragment AssetUrlsAudienceFragment on AssetURLs {
canonical {
brand {
key
}
path
}
external {
url
}
published {
brand {
key
}
path
}
}
fragment TagFragmentAudience on Tag {
company {
exchangeCode
stockCode
}
context {
name
}
description
displayName
externalEntities {
google {
placeId
}
wikipedia {
publicId
url
}
}
id
latestStoriesConnection(first: $firstStories, after: $afterStories) {
edges {
node {
byline {
...AssetBylineFragment
}
headlines {
headline
}
ads {
sponsor {
name
}
}
overview {
about
label
}
type
dates {
firstPublished
published
}
id
publicId
images {
...AssetImagesFragmentAudience
}
tags {
primary {
...TagFragmentAudience
}
secondary {
...TagFragmentAudience
}
}
urls {
...AssetUrlsAudienceFragment
}
}
}
pageInfo {
endCursor
hasNextPage
}
location {
latitude
longitude
postalCode
state
}
name
publicId
seo {
canonical {
brand {
key
description
title
}
urls {
canonical {
brand {
key
}
path
}
}
description
title
}
social {
image {
height
url
width
}
}
}
redirect
}
}
fragment AssetBylineFragment on AssetByline {
type
... on AssetBylineAuthor {
author {
name
publicId
profile {
avatar
bio
body
canonical {
brand {
key
published {
brand {
key
}
path
}
}
email
socials {
facebook {
publicId
}
twitter {
publicId
}
}
title
}
}
}
... on AssetBylineName {
name
}
}
fragment AssetImagesFragmentAudience on ImageRenditions {
landscape16x9 {
...ImageFragmentAudience
}
landscape3x2 {
...ImageFragmentAudience
}
portrait2x3 {
...ImageFragmentAudience
}
square1x1 {
...ImageFragmentAudience
}
}
fragment ImageFragmentAudience on ImageRendition {
altText
animated
caption
credit
crop {
offsetX
offsetY
width
zoom
}
mediaId
mimeType
source
type
}
fragment AssetUrlsAudienceFragment on AssetURLs {
canonical {
brand {
key
}
path
}
external {
url
}
published {
brand {
key
}
path
}
}
fragment TagFragmentAudience on Tag {
company {
exchangeCode
stockCode
}
context {
name
}
description
displayName
externalEntities {
google {
placeId
}
wikipedia {
publicId
url
}
}
id
location {
latitude
longitude
postalCode
state
}
name
publicId
seo {
description
title
}
urls {
canonical {
brand {
key
}
path
}
published {
brand {
key
}
path
}
}
}`;
`;
export const assetsConnectionByCriteriaQuery = /* GraphQL */ `query assetsConnectionByCriteria(
$after: ID
$brand: Brand!
$categories: [Int!]
$first: Int!
$render: Render!
$types: [AssetType!]!
) {
assetsConnectionByCriteria(
after: $after
brand: $brand
categories: $categories
first: $first
render: $render
types: $types
) {
edges {
cursor
node {
...AssetFragment
sponsor {
name
}
export const assetsConnectionByCriteriaQuery = /* GraphQL */ `
query assetsConnectionByCriteria($after: ID, $brand: Brand!, $categories: [Int!], $first: Int!, $render: Render!, $types: [AssetType!]!) {
assetsConnectionByCriteria(after: $after, brand: $brand, categories: $categories, first: $first, render: $render, types: $types) {
edges {
cursor
node {
...AssetFragment
sponsor {
name
}
}
}
error {
message
type {
class
}
}
pageInfo {
endCursor
hasNextPage
}
}
}
error {
message
type {
class
}
fragment AssetFragment on Asset {
asset {
about
byline
duration
headlines {
headline
}
live
}
}
pageInfo {
endCursor
hasNextPage
}
}
}
fragment AssetFragment on Asset {
asset {
about
byline
duration
headlines {
headline
}
live
}
assetType
dates {
firstPublished
modified
published
}
id
featuredImages {
landscape16x9 {
...ImageFragment
}
landscape3x2 {
...ImageFragment
}
portrait2x3 {
...ImageFragment
}
square1x1 {
...ImageFragment
}
}
label
tags {
primary: primaryTag {
...AssetTag
}
secondary {
...AssetTag
}
}
urls {
...AssetURLs
}
}
fragment AssetTag on AssetTagDetails {
...AssetTagAudience
shortID
slug
}
fragment AssetTagAudience on AssetTagDetails {
company {
exchangeCode
stockCode
}
context
displayName
id
name
urls {
canonical {
brand
path
}
published {
afr {
path
assetType
dates {
firstPublished
modified
published
}
id
featuredImages {
landscape16x9 {
...ImageFragment
}
landscape3x2 {
...ImageFragment
}
portrait2x3 {
...ImageFragment
}
square1x1 {
...ImageFragment
}
}
label
tags {
primary: primaryTag {
...AssetTag
}
secondary {
...AssetTag
}
}
urls {
...AssetURLs
}
}
}
}
fragment AssetURLs on AssetURLs {
canonical {
brand
path
fragment AssetTag on AssetTagDetails {
...AssetTagAudience
shortID
slug
}
published {
afr {
path
}
fragment AssetTagAudience on AssetTagDetails {
company {
exchangeCode
stockCode
}
context
displayName
id
name
urls {
canonical {
brand
path
}
published {
afr {
path
}
}
}
}
}
fragment ImageFragment on Image {
data {
altText
aspect
autocrop
caption
cropWidth
id
offsetX
offsetY
zoom
fragment AssetURLs on AssetURLs {
canonical {
brand
path
}
published {
afr {
path
}
}
}
}`;
fragment ImageFragment on Image {
data {
altText
aspect
autocrop
caption
cropWidth
id
offsetX
offsetY
zoom
}
}
`;
File diff suppressed because it is too large Load Diff
+199 -205
View File
@@ -39,227 +39,221 @@ export const getCreatorPostReelList = (identifier: string, limit: number): Promi
Referer: baseUrl,
},
body: JSON.stringify({
query: /* GraphQL */ `query CreatorPostReelList($identifier: String!, $first: Int, $after: String, $last: Int, $before: String) {
posts(
where: {status: {equals: PUBLISHED}, creator: {is: {identifier: {equals: $identifier}}}}
orderBy: [{pinnedAt: {nulls: last, sort: desc}}, {order: asc}, {createdAt: desc}, {id: desc}]
first: $first
after: $after
last: $last
before: $before
) {
nodes {
...PostSwiper_Post
}
pageInfo {
hasNextPage
endCursor
hasPreviousPage
startCursor
}
}
}
query: /* GraphQL */ `
query CreatorPostReelList($identifier: String!, $first: Int, $after: String, $last: Int, $before: String) {
posts(
where: { status: { equals: PUBLISHED }, creator: { is: { identifier: { equals: $identifier } } } }
orderBy: [{ pinnedAt: { nulls: last, sort: desc } }, { order: asc }, { createdAt: desc }, { id: desc }]
first: $first
after: $after
last: $last
before: $before
) {
nodes {
...PostSwiper_Post
}
pageInfo {
hasNextPage
endCursor
hasPreviousPage
startCursor
}
}
}
fragment PostSwiper_Post on Post {
id
title
isFavorite
favoritesCount
...PostSwiperSlide_Post
}
fragment PostSwiper_Post on Post {
id
title
isFavorite
favoritesCount
...PostSwiperSlide_Post
}
fragment PostSwiperSlide_Post on Post {
id
type
title
price
creator {
displayName
}
...PostVideoElement_Post
...PostImageElement_Post
}
fragment PostSwiperSlide_Post on Post {
id
type
title
price
creator {
displayName
}
...PostVideoElement_Post
...PostImageElement_Post
}
fragment PostVideoElement_Post on Post {
id
title
contentData {
... on PostVideoType {
__typename
videoUrl
isSample
noSample
durationSeconds
}
}
isFavorite
sampleVideoId
thumbnailUrl
creator {
displayName
}
...PostInfo_Post
...VideoControlIcons_Post
...PurchaseWrapper_Post
}
fragment PostVideoElement_Post on Post {
id
title
contentData {
... on PostVideoType {
__typename
videoUrl
isSample
noSample
durationSeconds
}
}
isFavorite
sampleVideoId
thumbnailUrl
creator {
displayName
}
...PostInfo_Post
...VideoControlIcons_Post
...PurchaseWrapper_Post
}
fragment PostInfo_Post on Post {
title
description
publishStartAt
price
isBuyEnabled
...Profile_Post
}
fragment PostInfo_Post on Post {
title
description
publishStartAt
price
isBuyEnabled
...Profile_Post
}
fragment Profile_Post on Post {
id
creator {
id
isSelf
identifier
displayName
avatarImageUrl
following
}
}
fragment Profile_Post on Post {
id
creator {
id
isSelf
identifier
displayName
avatarImageUrl
following
}
}
fragment VideoControlIcons_Post on Post {
id
isMine
pinnedAt
favoritesCount
...PostComment_Post
}
fragment VideoControlIcons_Post on Post {
id
isMine
pinnedAt
favoritesCount
...PostComment_Post
}
fragment PostComment_Post on Post {
id
isMine
canComment
comments(
where: {OR: [{parentPostComment: {is: {isDeleted: {equals: false}}}}, {parentPostCommentId: {equals: null}}], isDeleted: {equals: false}}
) {
totalCount
}
...PostCommentReplyDrawer_Post
}
fragment PostComment_Post on Post {
id
isMine
canComment
comments(where: { OR: [{ parentPostComment: { is: { isDeleted: { equals: false } } } }, { parentPostCommentId: { equals: null } }], isDeleted: { equals: false } }) {
totalCount
}
...PostCommentReplyDrawer_Post
}
fragment PostCommentReplyDrawer_Post on Post {
id
isMine
canComment
}
fragment PostCommentReplyDrawer_Post on Post {
id
isMine
canComment
}
fragment PurchaseWrapper_Post on Post {
id
title
price
creator {
displayName
}
...PostPurchaseDialog_Post
...PostPurchaseSingleDialog_Post
}
fragment PurchaseWrapper_Post on Post {
id
title
price
creator {
displayName
}
...PostPurchaseDialog_Post
...PostPurchaseSingleDialog_Post
}
fragment PostPurchaseDialog_Post on Post {
id
isBuyEnabled
price
thumbnailUrl
title
planPosts(
orderBy: [{plan: {deleteRequestAt: {sort: desc, nulls: first}}}, {plan: {isRecommended: desc}}, {plan: {price: asc}}]
) {
nodes {
plan {
id
title
price
...PlanSwiper_Plan
}
}
}
creator {
displayName
}
...PostPurchaseSingleDialog_Post
}
fragment PostPurchaseDialog_Post on Post {
id
isBuyEnabled
price
thumbnailUrl
title
planPosts(orderBy: [{ plan: { deleteRequestAt: { sort: desc, nulls: first } } }, { plan: { isRecommended: desc } }, { plan: { price: asc } }]) {
nodes {
plan {
id
title
price
...PlanSwiper_Plan
}
}
}
creator {
displayName
}
...PostPurchaseSingleDialog_Post
}
fragment PlanSwiper_Plan on Plan {
id
...PlanSwiperItem_Plan
}
fragment PlanSwiper_Plan on Plan {
id
...PlanSwiperItem_Plan
}
fragment PlanSwiperItem_Plan on Plan {
id
title
price
isArchive
isRecommended
deleteRequestAt
isSubscribing
subscriptionCloseAt
capacity
subscribersCount
planPosts(
where: {post: {is: {status: {equals: PUBLISHED}}}}
first: 7
orderBy: [{createdAt: desc}]
) {
nodes {
post {
id
thumbnailUrl
title
}
}
totalCount
}
...PlanUnavailableNote_Plan
}
fragment PlanSwiperItem_Plan on Plan {
id
title
price
isArchive
isRecommended
deleteRequestAt
isSubscribing
subscriptionCloseAt
capacity
subscribersCount
planPosts(where: { post: { is: { status: { equals: PUBLISHED } } } }, first: 7, orderBy: [{ createdAt: desc }]) {
nodes {
post {
id
thumbnailUrl
title
}
}
totalCount
}
...PlanUnavailableNote_Plan
}
fragment PlanUnavailableNote_Plan on Plan {
capacity
subscribersCount
subscriptionCloseAt
deleteRequestAt
}
fragment PlanUnavailableNote_Plan on Plan {
capacity
subscribersCount
subscriptionCloseAt
deleteRequestAt
}
fragment PostPurchaseSingleDialog_Post on Post {
id
price
thumbnailUrl
title
isBuyEnabled
}
fragment PostPurchaseSingleDialog_Post on Post {
id
price
thumbnailUrl
title
isBuyEnabled
}
fragment PostImageElement_Post on Post {
id
title
contentData {
__typename
... on PostImageType {
encrypted
imageUrls
count
}
}
isFavorite
creator {
displayName
}
...PostInfo_Post
...ImageControlIcons_Post
...PurchaseWrapper_Post
}
fragment PostImageElement_Post on Post {
id
title
contentData {
__typename
... on PostImageType {
encrypted
imageUrls
count
}
}
isFavorite
creator {
displayName
}
...PostInfo_Post
...ImageControlIcons_Post
...PurchaseWrapper_Post
}
fragment ImageControlIcons_Post on Post {
id
isMine
pinnedAt
favoritesCount
...PostComment_Post
}`,
fragment ImageControlIcons_Post on Post {
id
isMine
pinnedAt
favoritesCount
...PostComment_Post
}
`,
variables: { identifier, first: limit, after: '' },
operationName: 'CreatorPostReelList',
}),
+17 -13
View File
@@ -36,12 +36,14 @@ async function handler(ctx) {
json: {
operationName: 'comicById',
variables: { comicId: id },
query: /* GraphQL */ `query comicById($comicId: ID!) {
comicById(comicId: $comicId) {
title
imageUrl
query: /* GraphQL */ `
query comicById($comicId: ID!) {
comicById(comicId: $comicId) {
title
imageUrl
}
}
}`,
`,
},
});
@@ -51,15 +53,17 @@ async function handler(ctx) {
json: {
operationName: 'chapterByComicId',
variables: { comicId: id },
query: /* GraphQL */ `query chapterByComicId($comicId: ID!) {
chaptersByComicId(comicId: $comicId) {
id
serial
type
dateUpdated
size
query: /* GraphQL */ `
query chapterByComicId($comicId: ID!) {
chaptersByComicId(comicId: $comicId) {
id
serial
type
dateUpdated
size
}
}
}`,
`,
},
});
+8 -4
View File
@@ -66,13 +66,15 @@ async function handler() {
body: {
operationName: 'questionContent',
variables: { titleSlug },
query: /* GraphQL */ `query questionContent($titleSlug: String!) {
query: /* GraphQL */ `
query questionContent($titleSlug: String!) {
question(titleSlug: $titleSlug) {
content
mysqlSchemas
dataSchemas
}
}`,
}
`,
},
});
@@ -81,13 +83,15 @@ async function handler() {
body: {
operationName: 'officialSolution',
variables: { titleSlug },
query: /* GraphQL */ `query officialSolution($titleSlug: String!) {
query: /* GraphQL */ `
query officialSolution($titleSlug: String!) {
question(titleSlug: $titleSlug) {
solution {
content
}
}
}`,
}
`,
},
});
+27 -23
View File
@@ -30,15 +30,17 @@ async function handler() {
};
const url = host + '/graphql';
const dailyQuestionPayload = {
query: /* GraphQL */ `query questionOfToday {
todayRecord {
date
question {
frontendQuestionId: questionFrontendId
titleSlug
query: /* GraphQL */ `
query questionOfToday {
todayRecord {
date
question {
frontendQuestionId: questionFrontendId
titleSlug
}
}
}
} `,
`,
variables: {},
};
const dailyQuestionResponse = await got({
@@ -56,25 +58,27 @@ async function handler() {
const detailsPayload = {
operationName: 'questionData',
query: /* GraphQL */ `query questionData($titleSlug: String!) {
question(titleSlug: $titleSlug) {
questionId
questionFrontendId
title
titleSlug
content
translatedTitle
translatedContent
difficulty
topicTags {
name
slug
translatedName
query: /* GraphQL */ `
query questionData($titleSlug: String!) {
question(titleSlug: $titleSlug) {
questionId
questionFrontendId
title
titleSlug
content
translatedTitle
translatedContent
difficulty
topicTags {
name
slug
translatedName
__typename
}
__typename
}
__typename
}
}`,
`,
variables: {
titleSlug: question.titleSlug,
},
+28 -24
View File
@@ -30,16 +30,18 @@ async function handler() {
};
const url = host + '/graphql';
const dailyQuestionPayload = {
query: /* GraphQL */ `query questionOfToday {
activeDailyCodingChallengeQuestion {
date
link
question {
frontendQuestionId: questionFrontendId
titleSlug
query: /* GraphQL */ `
query questionOfToday {
activeDailyCodingChallengeQuestion {
date
link
question {
frontendQuestionId: questionFrontendId
titleSlug
}
}
}
} `,
`,
variables: {},
};
const dailyQuestionResponse = await got({
@@ -57,25 +59,27 @@ async function handler() {
const detailsPayload = {
operationName: 'questionData',
query: /* GraphQL */ `query questionData($titleSlug: String!) {
question(titleSlug: $titleSlug) {
questionId
questionFrontendId
title
titleSlug
content
translatedTitle
translatedContent
difficulty
topicTags {
name
slug
translatedName
query: /* GraphQL */ `
query questionData($titleSlug: String!) {
question(titleSlug: $titleSlug) {
questionId
questionFrontendId
title
titleSlug
content
translatedTitle
translatedContent
difficulty
topicTags {
name
slug
translatedName
__typename
}
__typename
}
__typename
}
}`,
`,
variables: {
titleSlug: question.titleSlug,
},
@@ -41,20 +41,22 @@ async function handler() {
url,
json: {
operationName: 'questionOfToday',
query: /* GraphQL */ `query questionOfToday {
todayRecord {
date
userStatus
question {
questionId
frontendQuestionId: questionFrontendId
difficulty
title
titleCn: translatedTitle
titleSlug
}
query: /* GraphQL */ `
query questionOfToday {
todayRecord {
date
userStatus
question {
questionId
frontendQuestionId: questionFrontendId
difficulty
title
titleCn: translatedTitle
titleSlug
}
}`,
}
}
`,
variables: {},
},
headers,
@@ -70,22 +72,24 @@ async function handler() {
url,
json: {
operationName: 'questionData',
query: /* GraphQL */ `query questionData($titleSlug: String!) {
question(titleSlug: $titleSlug) {
questionId
questionFrontendId
categoryTitle
boundTopicId
title
titleSlug
content
translatedTitle
translatedContent
isPaidOnly
difficulty
likes
}
}`,
query: /* GraphQL */ `
query questionData($titleSlug: String!) {
question(titleSlug: $titleSlug) {
questionId
questionFrontendId
categoryTitle
boundTopicId
title
titleSlug
content
translatedTitle
translatedContent
isPaidOnly
difficulty
likes
}
}
`,
variables: {
titleSlug: questionTitle,
},
@@ -101,30 +105,32 @@ async function handler() {
url,
json: {
operationName: 'questionSolutionArticles',
query: /* GraphQL */ `query questionSolutionArticles($questionSlug: String!, $skip: Int, $first: Int, $orderBy: SolutionArticleOrderBy, $userInput: String, $tagSlugs: [String!]) {
questionSolutionArticles(questionSlug: $questionSlug, skip: $skip, first: $first, orderBy: $orderBy, userInput: $userInput, tagSlugs: $tagSlugs) {
totalNum
edges {
node {
query: /* GraphQL */ `
query questionSolutionArticles($questionSlug: String!, $skip: Int, $first: Int, $orderBy: SolutionArticleOrderBy, $userInput: String, $tagSlugs: [String!]) {
questionSolutionArticles(questionSlug: $questionSlug, skip: $skip, first: $first, orderBy: $orderBy, userInput: $userInput, tagSlugs: $tagSlugs) {
totalNum
edges {
node {
...solutionArticle
__typename
}
__typename
}
__typename
}
__typename
}
fragment solutionArticle on SolutionArticleNode {
uuid
title
slug
createdAt
thumbnail
author {
username
}
summary
}`,
}
fragment solutionArticle on SolutionArticleNode {
uuid
title
slug
createdAt
thumbnail
author {
username
}
summary
}
`,
variables: {
questionSlug: questionTitle,
first: 3,
@@ -144,27 +150,29 @@ async function handler() {
url,
json: {
operationName: 'solutionDetailArticle',
query: /* GraphQL */ `query solutionDetailArticle($slug: String!, $orderBy: SolutionArticleOrderBy!) {
solutionArticle(slug: $slug, orderBy: $orderBy) {
...solutionArticle
content
question {
questionTitleSlug
__typename
}
query: /* GraphQL */ `
query solutionDetailArticle($slug: String!, $orderBy: SolutionArticleOrderBy!) {
solutionArticle(slug: $slug, orderBy: $orderBy) {
...solutionArticle
content
question {
questionTitleSlug
__typename
}
}
fragment solutionArticle on SolutionArticleNode {
uuid
title
slug
createdAt
thumbnail
author {
username
}
summary
}`,
}
fragment solutionArticle on SolutionArticleNode {
uuid
title
slug
createdAt
thumbnail
author {
username
}
summary
}
`,
variables: {
slug: art.node.slug,
orderBy: 'DEFAULT',
@@ -42,16 +42,18 @@ async function handler() {
url,
json: {
operationName: 'questionOfToday',
query: /* GraphQL */ `query questionOfToday {
activeDailyCodingChallengeQuestion {
date
link
question {
frontendQuestionId: questionFrontendId
titleSlug
}
query: /* GraphQL */ `
query questionOfToday {
activeDailyCodingChallengeQuestion {
date
link
question {
frontendQuestionId: questionFrontendId
titleSlug
}
}`,
}
}
`,
variables: {},
},
headers,
@@ -67,22 +69,24 @@ async function handler() {
url,
json: {
operationName: 'questionData',
query: /* GraphQL */ `query questionData($titleSlug: String!) {
question(titleSlug: $titleSlug) {
questionId
questionFrontendId
categoryTitle
boundTopicId
title
titleSlug
content
translatedTitle
translatedContent
isPaidOnly
difficulty
likes
}
}`,
query: /* GraphQL */ `
query questionData($titleSlug: String!) {
question(titleSlug: $titleSlug) {
questionId
questionFrontendId
categoryTitle
boundTopicId
title
titleSlug
content
translatedTitle
translatedContent
isPaidOnly
difficulty
likes
}
}
`,
variables: {
titleSlug: questionTitle,
},
@@ -98,29 +102,31 @@ async function handler() {
url,
json: {
operationName: 'QuestionNote',
query: /* GraphQL */ `query QuestionNote($titleSlug: String!) {
question(titleSlug: $titleSlug) {
questionId
article
solution {
id
content
contentTypeId
canSeeDetail
paidOnly
hasVideoSolution
paidOnlyVideo
rating {
id
count
average
userRating {
score
}
query: /* GraphQL */ `
query QuestionNote($titleSlug: String!) {
question(titleSlug: $titleSlug) {
questionId
article
solution {
id
content
contentTypeId
canSeeDetail
paidOnly
hasVideoSolution
paidOnlyVideo
rating {
id
count
average
userRating {
score
}
}
}
}
}
}
}`,
`,
variables: {
titleSlug: questionTitle,
},
+86 -78
View File
@@ -57,29 +57,31 @@ function newFollowingFeedQuery(pagingLimit = 5) {
limit: pagingLimit,
},
},
query: /* GraphQL */ `query LegacyFollowingFeedQuery($paging: PagingOptions) {
followingFeed(paging: $paging) {
items {
feedId
post {
mediumUrl
__typename
query: /* GraphQL */ `
query LegacyFollowingFeedQuery($paging: PagingOptions) {
followingFeed(paging: $paging) {
items {
feedId
post {
mediumUrl
__typename
}
__typename
}
pagingInfo {
next {
to
from
limit
source
__typename
}
__typename
}
__typename
}
__typename
}
pagingInfo {
next {
to
from
limit
source
__typename
}
__typename
}
__typename
}
}`,
`,
};
}
@@ -92,28 +94,30 @@ function newWebInlineRecommendedFeedQuery(pagingLimit = 5) {
limit: pagingLimit,
},
},
query: /* GraphQL */ `query LegacyWebInlineRecommendedFeedQuery($paging: PagingOptions, $forceRank: Boolean) {
webRecommendedFeed(paging: $paging, forceRank: $forceRank) {
items {
feedId
post {
mediumUrl
__typename
query: /* GraphQL */ `
query LegacyWebInlineRecommendedFeedQuery($paging: PagingOptions, $forceRank: Boolean) {
webRecommendedFeed(paging: $paging, forceRank: $forceRank) {
items {
feedId
post {
mediumUrl
__typename
}
__typename
}
pagingInfo {
next {
limit
to
source
__typename
}
__typename
}
__typename
}
__typename
}
pagingInfo {
next {
limit
to
source
__typename
}
__typename
}
__typename
}
}`,
`,
};
}
@@ -127,29 +131,31 @@ function newWebInlineTopicFeedQuery(tagSlug, pagingLimit = 5) {
},
skipCache: true,
},
query: /* GraphQL */ `query LegacyWebInlineTopicFeedQuery($tagSlug: String!, $paging: PagingOptions!, $skipCache: Boolean) {
personalisedTagFeed(tagSlug: $tagSlug, paging: $paging, skipCache: $skipCache) {
items {
feedId
post {
mediumUrl
__typename
query: /* GraphQL */ `
query LegacyWebInlineTopicFeedQuery($tagSlug: String!, $paging: PagingOptions!, $skipCache: Boolean) {
personalisedTagFeed(tagSlug: $tagSlug, paging: $paging, skipCache: $skipCache) {
items {
feedId
post {
mediumUrl
__typename
}
__typename
}
pagingInfo {
next {
source
limit
from
to
__typename
}
__typename
}
__typename
}
__typename
}
pagingInfo {
next {
source
limit
from
to
__typename
}
__typename
}
__typename
}
}`,
`,
};
}
@@ -162,24 +168,26 @@ function newUserCatalogMainContentQuery(catalogId, pagingLimit = 20) {
limit: pagingLimit,
},
},
query: /* GraphQL */ `query UserCatalogMainContentQuery($catalogId: ID!, $pagingOptions: CatalogPagingOptionsInput!) {
catalogById(catalogId: $catalogId) {
__typename
... on Catalog {
name
itemsConnection(pagingOptions: $pagingOptions) {
items {
entity {
... on Post {
mediumUrl
}
}
query: /* GraphQL */ `
query UserCatalogMainContentQuery($catalogId: ID!, $pagingOptions: CatalogPagingOptionsInput!) {
catalogById(catalogId: $catalogId) {
__typename
}
__typename
... on Catalog {
name
itemsConnection(pagingOptions: $pagingOptions) {
items {
entity {
... on Post {
mediumUrl
}
}
__typename
}
__typename
}
}
}
}
}
}`,
`,
};
}
+26 -24
View File
@@ -71,33 +71,35 @@ async function handler() {
const requestEndpoint = `${baseURL}/graphql`;
const requestBody = JSON.stringify({
query: /* GraphQL */ `query PaginatedQuery($url: String!, $page: Int = 1, $widgetType: String!) {
paginatedWidget(url: $url, widgetType: $widgetType) {
... on SimpleArticleGridWidget {
articles(page: $page) {
results {
_id
headline
fullUrlPath
featured
category
contentType
tags {
tag
}
attribution
subAttribution
sell
images {
thumbnail_widescreen_553 {
url
query: /* GraphQL */ `
query PaginatedQuery($url: String!, $page: Int = 1, $widgetType: String!) {
paginatedWidget(url: $url, widgetType: $widgetType) {
... on SimpleArticleGridWidget {
articles(page: $page) {
results {
_id
headline
fullUrlPath
featured
category
contentType
tags {
tag
}
attribution
subAttribution
sell
images {
thumbnail_widescreen_553 {
url
}
}
}
}
}
}
}
}
}
}
}`,
`,
operationName: 'PaginatedQuery',
variables: {
widgetType: 'simpleArticleGrid',