Skip to content

Commit 519cfcb

Browse files
fix/increase query limit to 1000 (#181)
* fix: increase pagination limit to 1000 for speakers, sponsors, and teams queries * fix: correct typo in community description for Open Source Day 2024 * fix: update tickets query to include pagination limit and adjust response handling * fix: failing build issue * fix: add extra fields to tickets query for enhanced data retrieval * fix: correct header formatting in README --------- Co-authored-by: Ashish Zapadiya <ashishzapadiya834@gmail.com>
1 parent aea1b1d commit 519cfcb

File tree

7 files changed

+20
-14
lines changed

7 files changed

+20
-14
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ We are simultaneously improving the accuracy of data (removing mock data) and im
2727
2. Install dependencies: `npm install`
2828
3. Run the development server: `npm run dev`
2929

30-
##
30+
#

src/lib/graphql/queries/speakers.query.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const query = gql`
1111
title
1212
segment
1313
14-
speakers {
14+
speakers(pagination: { limit: 1000 }) {
1515
id
1616
name
1717
position
@@ -37,7 +37,7 @@ const query = gql`
3737
title
3838
segment
3939
40-
speakers {
40+
speakers(pagination: { limit: 1000 }) {
4141
id
4242
name
4343
position

src/lib/graphql/queries/sponsors.query.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ const query = gql`
66
query GetSponsors {
77
sponsors {
88
documentId
9-
sponsors {
9+
sponsors(pagination: { limit: 1000 }) {
1010
id
1111
title
12-
sponsors {
12+
sponsors(pagination: { limit: 1000 }) {
1313
id
1414
number
1515
name

src/lib/graphql/queries/teams.query.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ const query = gql`
66
query GetTeams {
77
teams {
88
documentId
9-
teams {
9+
teams(pagination: { limit: 1000 }) {
1010
id
1111
title
1212
description
13-
teams {
13+
teams(pagination: { limit: 1000 }) {
1414
id
1515
number
1616
name

src/lib/graphql/queries/tickets.query.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ import { gql } from "graphql-request";
44
const query = gql`
55
query GetTickets {
66
tickets {
7-
documentId
8-
tickets {
7+
tickets(pagination: { limit: 1000 }) {
98
id
109
name
1110
description
@@ -19,11 +18,17 @@ const query = gql`
1918
fillingFast
2019
konfhubUrl
2120
linkText
21+
extra
22+
featureTitle
2223
alert {
2324
id
2425
text
2526
classes
2627
}
28+
features {
29+
id
30+
featureText
31+
}
2732
}
2833
}
2934
}

src/pages/past-events.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ const osd2025Photos = PastEvent[0]?.images?.slice(0, 4) ?? [];
138138
<div class="text-3xl font-black text-gray-300 shrink-0">2024</div>
139139
<div class="flex-1">
140140
<div class="font-bold text-gray-900">Open Source Day 2024</div>
141-
<div class="text-gray-500 text-sm">Another milestone year for the open source communityt</div>
141+
<div class="text-gray-500 text-sm">Another milestone year for the open source community</div>
142142
</div>
143143
<svg
144144
class="accordion-chevron w-5 h-5 text-gray-400 transition-transform duration-300 shrink-0"

src/pages/tickets.astro

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ import { TICKETS } from "@/config/config.ts";
55
import PageHero from "@/components/PageHero.jsx";
66
77
import { ticketsData } from "@/lib/graphql/queries/tickets.query.ts";
8-
console.log(JSON.stringify(ticketsData, null, 2));
8+
const ticketsResponse = ticketsData?.tickets?.[0]?.tickets || [];
9+
console.log(JSON.stringify(ticketsResponse, null, 2));
910
---
1011

1112
<Layout title="Tickets — Open Source Day 2026" activePath="/tickets">
@@ -28,7 +29,7 @@ console.log(JSON.stringify(ticketsData, null, 2));
2829
</div>
2930
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
3031
{
31-
TICKETS.map((ticket) => (
32+
ticketsResponse.map((ticket: any) => (
3233
<div
3334
class={`relative border-2 rounded-2xl p-6 text-center hover:shadow-lg transition-all hover:-translate-y-1 bg-white ${ticket.popular ? "border-green-300 scale-105" : "border-gray-200"}`}
3435
>
@@ -42,12 +43,12 @@ console.log(JSON.stringify(ticketsData, null, 2));
4243
<p class="text-gray-500 text-sm mb-5">{ticket.description}</p>
4344
{ticket?.featureTitle && <p class="text-gray-900 font-semibold text-sm mb-2 text-left">{ticket?.featureTitle}</p>}
4445
<ul class="text-left space-y-2 text-sm text-gray-600 mb-6">
45-
{ticket.features.map((f) => (
46+
{ticket?.features?.map((f: any) => (
4647
<li class="flex items-start gap-2">
4748
<svg class="w-4 h-4 text-green-500 mt-0.5 shrink-0" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor">
4849
<path stroke-linecap="round" stroke-linejoin="round" d="m4.5 12.75 6 6 9-13.5" />
4950
</svg>
50-
{f}
51+
{f?.featureText ?? "-"}
5152
</li>
5253
))}
5354
</ul>

0 commit comments

Comments
 (0)