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

examples/graphql_issues.rs: Demonstrate variables and paging #481

Merged
merged 1 commit into from
Nov 1, 2023

Conversation

Enselic
Copy link
Contributor

@Enselic Enselic commented Nov 1, 2023

This was quite tricky to figure out how to do (for me, anyway), so let's help others by demonstrating how to do it.

Example output:

$ GITHUB_TOKEN=github_pat_123ABC cargo run --example=graphql_issues
Page 1:
https://github.com/XAMPPRocky/octocrab/issues/435 Installation tokens are hard to re-use
https://github.com/XAMPPRocky/octocrab/issues/456 `IssueHandle::delete_label` panics
https://github.com/XAMPPRocky/octocrab/issues/463 [Bug] octocrab::Octocrab::request_installation_auth_token fails with status code 411
https://github.com/XAMPPRocky/octocrab/issues/474 Add Method For Viewing Repository Traffic Stats
https://github.com/XAMPPRocky/octocrab/issues/475 Add API Version configuration to the builder
Page 2:
https://github.com/XAMPPRocky/octocrab/issues/398 Improve Commits API
https://github.com/XAMPPRocky/octocrab/issues/417 Add Projects API
https://github.com/XAMPPRocky/octocrab/issues/421 How to access commit compare endpoint?
https://github.com/XAMPPRocky/octocrab/issues/422 Add `Status`/`Conclusion` enums directly to fields
https://github.com/XAMPPRocky/octocrab/issues/423 Add a `Page::all` method
Page 3:
https://github.com/XAMPPRocky/octocrab/issues/377 Generating Github REST API from Open-API
https://github.com/XAMPPRocky/octocrab/issues/380 Source closed when authenticating with personal token
https://github.com/XAMPPRocky/octocrab/issues/381 The Workflow Run Event Action `in_progress` is Not Supported
https://github.com/XAMPPRocky/octocrab/issues/394 Add method for downloading job logs
https://github.com/XAMPPRocky/octocrab/issues/396 Initializing octocrab takes 300ms on macOS

This was quite tricky to figure out how to do (for me, anyway), so let's
help others by demonstrating how to do it.
@XAMPPRocky
Copy link
Owner

Thank you for your PR!

LGTM, though I think as your graphql gets complex I would recommend using a graphql library with it. That might be another good example.

@XAMPPRocky XAMPPRocky merged commit 3d4a08c into XAMPPRocky:main Nov 1, 2023
10 checks passed
This was referenced Nov 1, 2023
@Enselic Enselic deleted the graphql_issues_variables branch November 4, 2023 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants