Skip to content

IssuesFiltered is unusable by external consumers — IssueFilter lives in `internal/graphql #85

@Nathansh14

Description

@Nathansh14

IssuesFiltered is unusable by external consumers — IssueFilter lives in internal/graphql

Summary

Client.IssuesFiltered is exported on the public linear.Client but its parameter type, *intgraphql.IssueFilter, is defined in github.com/chainguard-sandbox/go-linear/v2/internal/graphql. External modules cannot import that package, so the method signature is visible but the method itself cannot be called.

Steps to reproduce

import gl "github.com/chainguard-sandbox/go-linear/v2/pkg/linear"

c, _ := gl.NewClient(apiKey)

// Cannot construct the filter — intgraphql is unreachable:
// filter := &intgraphql.IssueFilter{ ... }  // compile error

// So this call can never be made from outside the module:
// c.IssuesFiltered(ctx, &n, nil, filter)
./main.go:10:15: use of internal package github.com/chainguard-sandbox/go-linear/v2/internal/graphql not allowed

The same problem affects ProjectsFiltered, SearchIssues, and any other method whose parameters reference internal/graphql types.

Expected behaviour

Server-side filtering should be accessible to all callers. Either:

  1. Re-export IssueFilter (and related types) from the public package (pkg/linear), or
  2. Provide wrapper constructors / builder helpers in pkg/linear that construct the internal types, so callers never need to import internal/graphql directly.

Actual behaviour

Callers who need project- or state-scoped issue lists must either fetch the entire workspace and filter in memory, or bypass the SDK and write raw HTTP/GraphQL requests by hand.

Environment

  • Module: github.com/chainguard-sandbox/go-linear/v2
  • Version: v2.2.1
  • Go version: go1.24+

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions