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: Use graphql_client to get stronger typing #485

Merged
merged 1 commit into from
Nov 5, 2023

Conversation

Enselic
Copy link
Contributor

@Enselic Enselic commented Nov 4, 2023

This results in nicer code. The biggest downside is that we need the GitHub GraphQL schema. We could download it in a build script, but it's only about a megabyte, and changes rarely, so we can probably get away with versioning a copy of it in the repo. It's nice to not require custom build scripts.

Doing this was suggested in #481. I don't think we should keep the old example code though, because in the end it is nicer to use a typed API, and I don't think it is worth maintaining an example of an untyped API.

This results in nicer code. The biggest downside is that we need the
GitHub GraphQL schema. We could download it in a build script, but it's
only about a megabyte, and changes rarely, so we can probably get away
with versioning a copy of it in the repo. It's nice to avoid build
scripts.
@XAMPPRocky
Copy link
Owner

Thank you for your PR!

@XAMPPRocky XAMPPRocky merged commit 551871a into XAMPPRocky:main Nov 5, 2023
10 checks passed
@Enselic Enselic deleted the graphql_client branch November 11, 2023 15:42
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