Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add client-side GraphQL handling #2219

Merged
merged 12 commits into from
Jun 3, 2024

Conversation

williamjallen
Copy link
Collaborator

Apollo is currently the most popular GraphQL client and caching library. This PR eliminates my prior attempt at creating a custom GraphQL client, and sets up Apollo for future use. As a proof-of-concept, I switched /projects to a GraphQL backend to demonstrate Apollo's pagination features. While doing so, I added Luxon for easy client-side date handling.

Since the API endpoint for /projects is no longer used, I have marked it as deprecated, with final removal scheduled for CDash 4.0. Users of this endpoint are advised to use the GraphQL API instead.

Reviewers can see the pagination functionality in action by changing the default_count value in /config/lighthouse.php to a small value.

Copy link
Member

@josephsnyder josephsnyder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There seems to be some weird interaction with the current time and this update. When between the hour and 10 after, the graphql call reported a 200 response but actually an error had appeared
image

Once we got to <N>:10, the error disappeared and the GraphQL was able to return data and the page appeared.

@williamjallen williamjallen marked this pull request as draft May 29, 2024 13:59
@williamjallen
Copy link
Collaborator Author

@josephsnyder Good catch. This issue was the direct result of our nonstandard DateTime format. This PR should wait until #2225 is merged, so we can use ISO 8601 formatted dates for everything instead.

@williamjallen williamjallen marked this pull request as ready for review May 31, 2024 12:45
@zackgalbreath zackgalbreath added this pull request to the merge queue Jun 3, 2024
Merged via the queue into Kitware:master with commit 95bdb34 Jun 3, 2024
6 checks passed
@williamjallen williamjallen deleted the apollo-client branch June 4, 2024 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants