This change fixes a memory leak in the implementation of BatchQuery.
Prior to this change the use of reflection dynamically created new types using reflect.StructOf. The reflect library stores an internal cache of types it has created, which eventually leaks memory.
This change fixes the issue by replacing the reflection based query, with a raw string based generated query.
To do this we removed the stale "github.com/shurcooL/githubv4" package as a dependency. And added "github.com/hasura/go-graphql-client" which is a maintained GraphQL repository that allows for raw queriws to the GraphQL API (this package is a fork of github.com/shurcooL/graphql)
This implementation introduces a Reset() method to the PagedQuery interface, as this new implementation doesn't like seeing a populated object when subsequent queries are made.
This change fixes a memory leak in the implementation of
BatchQuery
.Prior to this change the use of reflection dynamically created new types using
reflect.StructOf
. The reflect library stores an internal cache of types it has created, which eventually leaks memory.This change fixes the issue by replacing the reflection based query, with a raw string based generated query.
To do this we removed the stale "github.com/shurcooL/githubv4" package as a dependency. And added "github.com/hasura/go-graphql-client" which is a maintained GraphQL repository that allows for raw queriws to the GraphQL API (this package is a fork of github.com/shurcooL/graphql)
This implementation introduces a
Reset()
method to thePagedQuery
interface, as this new implementation doesn't like seeing a populated object when subsequent queries are made.