graphql
by
shurcooL

Description: Package graphql provides a GraphQL client implementation.

View on GitHub ↗

Summary Information

Updated 44 minutes ago
Added to GitGenius on February 18th, 2025
Created on July 10th, 2017
Open Issues & Pull Requests: 54 (+0)
Number of forks: 286
Total Stargazers: 731 (+0)
Total Subscribers: 14 (+0)

Issue Activity (beta)

Open issues: 15
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 1,891 days
Stale 30+ days: 15
Stale 90+ days: 15

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • question (5)
  • API decision (2)
  • WaitingForInfo (2)
  • bug (2)
  • NeedsFix (1)
  • documentation (1)
  • enhancement (1)
  • thinking (1)

Most active issues this week

No issue events were indexed in the last 7 days.

Repository Insights (GitGenius)

Median issue/PR response: 363.8 days
Mean response time: 786.8 days
90th percentile: 2469.0 days
Tracked items: 6

Most active contributors

Detailed Description

The shurcool/graphql repository is a Go package that provides a GraphQL client implementation for making queries and mutations against GraphQL servers. Written in Go, it serves as a general-purpose GraphQL client library with a focus on simplicity and integration with Go's standard HTTP infrastructure.

The package is designed to allow developers to construct a GraphQL client by specifying a GraphQL server URL, then use that client to execute GraphQL queries and mutations. A key design decision is that the package does not directly handle authentication. Instead, users are expected to provide an http.Client that performs authentication, with the recommended approach being to use the golang.org/x/oauth2 package with an OAuth token that has appropriate scopes. This delegation of authentication responsibility keeps the core package focused and flexible.

The repository includes comprehensive documentation and examples for common GraphQL operations. For simple queries, developers define corresponding Go types and call the client.Query method. The package supports GraphQL arguments and variables through struct field tags, allowing developers to specify variable names in tags and then provide a variables map with their values when calling client.Query. The package also handles inline fragments, a GraphQL feature that allows querying different fields based on the concrete type of an interface or union, using struct field tags or embedded struct types.

Mutations are supported through a client.Mutate method, with the README providing examples of how mutations often depend on information retrieved from prior queries. The package includes two subdirectories: the ident package, which provides functions for parsing and converting identifier names between various naming conventions, and an internal jsonutil package that handles decoding JSON into GraphQL query data structures.

The repository is closely related to the shurcooL/githubv4 package, which is a specialized version of this client targeting GitHub's GraphQL API v4. According to the README, the githubv4 package is driving feature development for the graphql package, suggesting that improvements and new capabilities are often validated through real-world use against GitHub's API before being generalized in the core package.

GitGenius activity data shows relatively slow issue and pull request response latency, with a median response time of 8731.1 hours and a mean of 18882.1 hours across six tracked items. The most active contributor tracked is dmitshur with three events, followed by koote and williammartin with two events each. Active issue labels include API decision, WaitingForInfo, and question categories. The repository shares contributors with keycloak/keycloak, cloudnative-pg/cloudnative-pg, and nuxt/nuxt, indicating cross-project involvement among maintainers. The package is distributed under the MIT License.

graphql
by
shurcooLshurcooL/graphql

Repository Details

Fetching additional details & charts...