Skip to content

[Feature]: Switch to GraphQL.Client #76

@Malcolmnixon

Description

@Malcolmnixon

Problem Statement

The GitHubGraphQLClient class should use GraphQL.Client and GraphQL.Client.Serializer.SystemTextJson to perform GraphQL qeries.

Proposed Solution

The current GitHubGraphQLClient.cs should:

  • Be moved to a src/DemaConsulting.BuildMark/RepoConnectors/GitHub sub-folder
  • Switch from using a naked HttpClient to using a GraphQLHttpClient
  • Still support taking an HttpClient for mocking (using the GraphQLHttpClient constructor that takes an HttpClient)
  • Create a file for the GitHub response types
  • Modify the GitHubGraphQLClient.FindIssueIdsLinkedToPullRequestAsync method to use the GraphQL.Client APIs

Note that once this PR is done, most of the Octokit queries will be converted to use GraphQL queries through GitHubGraphQLClient with the goal of retiring Octokit; and eventually other clients such as the Azure DevOps client will also make use of GraphQLHttpClient.

Alternatives Considered

No response

Usage Examples

Benefits

Use of standard GraphQL implementation

Priority

Low - Nice to have

Willingness to Contribute

Yes, I can submit a pull request

Additional Context

No response

Checklist

  • I have searched existing issues to ensure this is not a duplicate
  • I have provided a clear description of the feature
  • I have explained why this feature would be useful

Metadata

Metadata

Labels

enhancementNew feature or request

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions