style: auto format

This commit is contained in:
github-actions[bot] 2026-03-25 09:24:21 +00:00
parent a6bbd0032e
commit 0fe46fe333
3 changed files with 92 additions and 80 deletions

View File

@ -39,43 +39,43 @@ export const route: Route = {
const ENDPOINT = 'https://api.aeonmedia.co/graphql';
const LIST_BY_SECTION = /* GraphQL */ `
query getAeonArticlesBySection($section: String!, $sortField: ArticleSortEnum = published_at, $afterCursor: String, $tag: String) {
section(site: aeon, slug: $section) {
slug
title
metaDescription
}
articles(
site: aeon
section: $section
status: [published]
tag: $tag
sort: {field: $sortField, order: desc}
after: $afterCursor
first: 24
) {
nodes {
slug
...aeonArticleCardFragment
query getAeonArticlesBySection($section: String!, $sortField: ArticleSortEnum = published_at, $afterCursor: String, $tag: String) {
section(site: aeon, slug: $section) {
slug
title
metaDescription
}
articles(site: aeon, section: $section, status: [published], tag: $tag, sort: { field: $sortField, order: desc }, after: $afterCursor, first: 24) {
nodes {
slug
...aeonArticleCardFragment
}
pageInfo {
hasNextPage
endCursor
}
}
}
pageInfo {
hasNextPage
endCursor
}
}
}
fragment aeonArticleCardFragment on Article {
id
title
slug
type
standfirstLong
authors { name }
image { url }
primaryTopic { title }
section { slug }
}
fragment aeonArticleCardFragment on Article {
id
title
slug
type
standfirstLong
authors {
name
}
image {
url
}
primaryTopic {
title
}
section {
slug
}
}
`;
async function handler(ctx) {

View File

@ -5,34 +5,34 @@ import { getData } from './utils';
const ENDPOINT = 'https://api.aeonmedia.co/graphql';
const LIST_BY_TYPE = /* GraphQL */ `
query getAeonArticlesByType($type: [ArticleTypeEnum!], $sortField: ArticleSortEnum = published_at, $afterCursor: String, $tag: String) {
articles(
site: aeon
type: $type
status: [published]
tag: $tag
sort: {field: $sortField, order: desc}
after: $afterCursor
first: 12
) {
nodes {
slug
...aeonArticleCardFragment
query getAeonArticlesByType($type: [ArticleTypeEnum!], $sortField: ArticleSortEnum = published_at, $afterCursor: String, $tag: String) {
articles(site: aeon, type: $type, status: [published], tag: $tag, sort: { field: $sortField, order: desc }, after: $afterCursor, first: 12) {
nodes {
slug
...aeonArticleCardFragment
}
}
}
}
}
fragment aeonArticleCardFragment on Article {
id
title
slug
type
standfirstLong
authors { name }
image { url }
primaryTopic { title }
section { slug }
}
fragment aeonArticleCardFragment on Article {
id
title
slug
type
standfirstLong
authors {
name
}
image {
url
}
primaryTopic {
title
}
section {
slug
}
}
`;
export const route: Route = {

View File

@ -9,29 +9,41 @@ import { parseDate } from '@/utils/parse-date';
const ENDPOINT = 'https://api.aeonmedia.co/graphql';
const ESSAY = /* GraphQL */ `
query getAeonEssay($slug: String!) {
essay(slug: $slug) {
publishedAt
updatedAt
authors { name authorBio }
audioUrl
image { url alt caption }
body
query getAeonEssay($slug: String!) {
essay(slug: $slug) {
publishedAt
updatedAt
authors {
name
authorBio
}
audioUrl
image {
url
alt
caption
}
body
}
}
}`;
`;
const VIDEO = /* GraphQL */ `
query getAeonVideo($slug: String!, $site: SiteEnum!) {
video(slug: $slug, site: $site) {
publishedAt
updatedAt
authors { name authorBio }
hoster
hosterId
credits
description
query getAeonVideo($slug: String!, $site: SiteEnum!) {
video(slug: $slug, site: $site) {
publishedAt
updatedAt
authors {
name
authorBio
}
hoster
hosterId
credits
description
}
}
}`;
`;
const renderVideoDescription = (article) => {
let video = article.hosterId;