examples/graphql_issues.rs: Use graphql_client to get stronger typing #485
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.