Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Khan/genqlient
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.8.0
Choose a base ref
...
head repository: Khan/genqlient
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
  • 16 commits
  • 90 files changed
  • 13 contributors

Commits on Mar 28, 2025

  1. Fix link in introduction.md (#374)

    ## Issue
    
    Currently, the link to `docs` in the `introduction.md` is broken; it
    hits a 404 page because it uses a relative link, pointing to the `docs`
    directory within the `docs` directory.
    
    ## Changes
    
    We've changed to use an absolute link instead.
    
    I have:
    - [x] Written a clear PR title and description (above)
    - [x] Signed the [Khan Academy CLA](https://www.khanacademy.org/r/cla)
    - [x] Added tests covering my changes, if applicable
    - [x] Included a link to the issue fixed, if applicable
    - [x] Included documentation, for new features
    - [x] Added an entry to the changelog
    
    ---------
    
    Co-authored-by: Craig Silverstein <[email protected]>
    Co-authored-by: Ben Kraft <[email protected]>
    3 people authored Mar 28, 2025
    Configuration menu
    Copy the full SHA
    63893ac View commit details
    Browse the repository at this point in the history
  2. Matching in genqlient by Normalizing Paths (#373)

    This pull request addresses an issue with the `genqlient` library, which
    uses the `doublestar` package for path matching. The current
    implementation does not correctly match paths on Windows systems due to
    differences in path separators. I've implemented a simple fix by
    converting Windows-style backslashes (`\`) to forward slashes (`/`)
    before performing the match, allowing the path matching to work
    correctly across all platforms.
    
    #371
    bmatcuk/doublestar#61
    imbytecat authored Mar 28, 2025
    Configuration menu
    Copy the full SHA
    3a0d213 View commit details
    Browse the repository at this point in the history

Commits on Apr 8, 2025

  1. chore: upgrade alexflint/go-arg (#375)

    Upgrade version of alexflint/go-arg from 1.4.2 to 1.5.1 to avoid an
    issue installing `genqlcient`:
    
    ```
    ./../../go/pkg/mod/github.com/alexflint/[email protected]/parse.go:13:2: github.com/alexflint/[email protected]: verifying module: checksum mismatch
    ```
    
    
    I have:
    - [x] Written a clear PR title and description (above)
    - [x] Signed the [Khan Academy CLA](https://www.khanacademy.org/r/cla)
    - [x] Added tests covering my changes, if applicable
    - [x] Included a link to the issue fixed, if applicable
    - [x] Included documentation, for new features
    - [x] Added an entry to the changelog
    
    ---------
    
    Co-authored-by: Casey Lee <[email protected]>
    Co-authored-by: Craig Silverstein <[email protected]>
    3 people authored Apr 8, 2025
    Configuration menu
    Copy the full SHA
    86db6f0 View commit details
    Browse the repository at this point in the history

Commits on Apr 13, 2025

  1. Add field aliasing (#376)

    Added @genqlient(alias) directive to customize field names without
    GraphQL aliases (fixes #367)
    clinta authored Apr 13, 2025
    Configuration menu
    Copy the full SHA
    bc17161 View commit details
    Browse the repository at this point in the history

Commits on Apr 14, 2025

  1. Auto snake case (#377)

    This builds on top of #376 by adding a configuration option to
    automatically convert all snake_case type and field names to CamelCase.
    clinta authored Apr 14, 2025
    Configuration menu
    Copy the full SHA
    e2e0ef0 View commit details
    Browse the repository at this point in the history

Commits on May 17, 2025

  1. Fix typo frragment -> fragment (#380)

    <!--
    Thanks for your contribution! Check out the
    [contributing
    docs](https://github.com/Khan/genqlient/blob/main/docs/CONTRIBUTING.md)
    for more on contributing to genqlient.
    -->
    
    
    
    I have:
    - [x] Written a clear PR title and description (above)
    - [x] Signed the [Khan Academy CLA](https://www.khanacademy.org/r/cla)
    - [X] Added tests covering my changes, if applicable
    - [x] Included a link to the issue fixed, if applicable
    - [x] Included documentation, for new features
    - [x] Added an entry to the changelog
    bryanwweber authored May 17, 2025
    Configuration menu
    Copy the full SHA
    ad1db8f View commit details
    Browse the repository at this point in the history

Commits on May 18, 2025

  1. Release v0.8.1 (#381)

    Mainly this is because we broke Windows in 0.8.0.
    
    I have:
    - [x] Written a clear PR title and description (above)
    - [x] Signed the [Khan Academy CLA](https://www.khanacademy.org/r/cla)
    - [x] Added tests covering my changes, if applicable
    - [x] Included a link to the issue fixed, if applicable
    - [x] Included documentation, for new features
    - [x] Added an entry to the changelog
    benjaminjkraft authored May 18, 2025
    Configuration menu
    Copy the full SHA
    6309a6e View commit details
    Browse the repository at this point in the history

Commits on Jun 17, 2025

  1. [Docs] subscription authentication (#385)

    This PR improves the documentation about authentication with
    Subscription client.
    
    Co-authored-by: Ben Kraft <[email protected]>
    cheina97 and benjaminjkraft authored Jun 17, 2025
    Configuration menu
    Copy the full SHA
    a4b774d View commit details
    Browse the repository at this point in the history

Commits on Jun 27, 2025

  1. Configuration menu
    Copy the full SHA
    d973af1 View commit details
    Browse the repository at this point in the history

Commits on Jun 28, 2025

  1. [Subscription] check already closed channels (#384)

    This PR fixes an issue I encountered using subscriptions with genqlient.
    
    I've noticed that the Unsubscribe function closes the subscription
    channel, but never checks if that channel has already been closed.
    
    So a snippet like that causes a panic when Close is called:
    
    ``` go
    err = gqlsubcl.Unsubscribe(subscriptionID)
    if err != nil {
    	return fmt.Errorf("failed to unsubscribe from GraphQL subscription: %w", err)
    }
    
    if err := gqlsubcl.Close(); err != nil {
    	return fmt.Errorf("failed to close GraphQL subscription client: %w", err)
    }
    ```
    
    I have:
    - [x] Written a clear PR title and description (above)
    - [x] Signed the [Khan Academy CLA](https://www.khanacademy.org/r/cla)
    - [x] Added tests covering my changes, if applicable
    - [ ] Included a link to the issue fixed, if applicable
    - [x] Included documentation, for new features
    - [x] Added an entry to the changelog
    cheina97 authored Jun 28, 2025
    Configuration menu
    Copy the full SHA
    b1fe42c View commit details
    Browse the repository at this point in the history
  2. feat: avoid error when subscription ID is not present (#387)

    This PR removes the error triggered when a websocket message does not
    contain a subscription ID.
    
    Check this issue
    https://github.com/issues?q=sort%3Aupdated-desc+is%3Aissue+is%3Aopen+author%3A%40me+archived%3Afalse&issue=Khan%7Cgenqlient%7C383
    
    I have:
    - [x] Written a clear PR title and description (above)
    - [x] Signed the [Khan Academy CLA](https://www.khanacademy.org/r/cla)
    - [x] Added tests covering my changes, if applicable
    - [x] Included a link to the issue fixed, if applicable
    - [ ] Included documentation, for new features
    - [x] Added an entry to the changelog
    
    ---------
    
    Co-authored-by: Ben Kraft <[email protected]>
    cheina97 and benjaminjkraft authored Jun 28, 2025
    Configuration menu
    Copy the full SHA
    35bfe03 View commit details
    Browse the repository at this point in the history

Commits on Aug 2, 2025

  1. Annotated optional fields with omitempty by using new optional conf…

    …ig value (#308)
    
    It could be useful to annotate optional fields annotate with `omitempty`
    when using pointers.
    By allowing this option, input fields that get removed (and not used is
    the executed queries) will not break.
    This gives the library an advantage to be more resilient against break
    API changes.
    
    To introduce this option, a new `optional` config value is introduced
    `pointer_omitempty`.
    
    If `optional: pointer_omitempty` is set. We generate
    ```
    type Task_insert_input struct {
      Id: *int `json:"id,omitempty"`
    }
    ```
    based on 
    ```
    input task_insert_input {
      id: Int
    }
    ```
    
    The `@genqlient(omitempty)` config will override the previous defined
    config.
    rmennes authored Aug 2, 2025
    Configuration menu
    Copy the full SHA
    ef288a3 View commit details
    Browse the repository at this point in the history
  2. Bump github.com/go-viper/mapstructure/v2 from 2.2.1 to 2.3.0 (#392)

    Bumps
    [github.com/go-viper/mapstructure/v2](https://github.com/go-viper/mapstructure)
    from 2.2.1 to 2.3.0.
    <details>
    <summary>Release notes</summary>
    <p><em>Sourced from <a
    href="https://github.com/go-viper/mapstructure/releases">github.com/go-viper/mapstructure/v2's
    releases</a>.</em></p>
    <blockquote>
    <h2>v2.3.0</h2>
    <h2>What's Changed</h2>
    <ul>
    <li>build(deps): bump actions/checkout from 4.1.7 to 4.2.0 by <a
    href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
    href="https://redirect.github.com/go-viper/mapstructure/pull/46">go-viper/mapstructure#46</a></li>
    <li>build(deps): bump golangci/golangci-lint-action from 6.1.0 to 6.1.1
    by <a href="https://github.com/dependabot"><code>@​dependabot</code></a>
    in <a
    href="https://redirect.github.com/go-viper/mapstructure/pull/47">go-viper/mapstructure#47</a></li>
    <li>[enhancement] Add check for <code>reflect.Value</code> in
    <code>ComposeDecodeHookFunc</code> by <a
    href="https://github.com/mahadzaryab1"><code>@​mahadzaryab1</code></a>
    in <a
    href="https://redirect.github.com/go-viper/mapstructure/pull/52">go-viper/mapstructure#52</a></li>
    <li>build(deps): bump actions/setup-go from 5.0.2 to 5.1.0 by <a
    href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
    href="https://redirect.github.com/go-viper/mapstructure/pull/51">go-viper/mapstructure#51</a></li>
    <li>build(deps): bump actions/checkout from 4.2.0 to 4.2.2 by <a
    href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
    href="https://redirect.github.com/go-viper/mapstructure/pull/50">go-viper/mapstructure#50</a></li>
    <li>build(deps): bump actions/setup-go from 5.1.0 to 5.2.0 by <a
    href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
    href="https://redirect.github.com/go-viper/mapstructure/pull/55">go-viper/mapstructure#55</a></li>
    <li>build(deps): bump actions/setup-go from 5.2.0 to 5.3.0 by <a
    href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
    href="https://redirect.github.com/go-viper/mapstructure/pull/58">go-viper/mapstructure#58</a></li>
    <li>ci: add Go 1.24 to the test matrix by <a
    href="https://github.com/sagikazarmark"><code>@​sagikazarmark</code></a>
    in <a
    href="https://redirect.github.com/go-viper/mapstructure/pull/74">go-viper/mapstructure#74</a></li>
    <li>build(deps): bump golangci/golangci-lint-action from 6.1.1 to 6.5.0
    by <a href="https://github.com/dependabot"><code>@​dependabot</code></a>
    in <a
    href="https://redirect.github.com/go-viper/mapstructure/pull/72">go-viper/mapstructure#72</a></li>
    <li>build(deps): bump golangci/golangci-lint-action from 6.5.0 to 6.5.1
    by <a href="https://github.com/dependabot"><code>@​dependabot</code></a>
    in <a
    href="https://redirect.github.com/go-viper/mapstructure/pull/76">go-viper/mapstructure#76</a></li>
    <li>build(deps): bump actions/setup-go from 5.3.0 to 5.4.0 by <a
    href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
    href="https://redirect.github.com/go-viper/mapstructure/pull/78">go-viper/mapstructure#78</a></li>
    <li>feat: add decode hook for netip.Prefix by <a
    href="https://github.com/tklauser"><code>@​tklauser</code></a> in <a
    href="https://redirect.github.com/go-viper/mapstructure/pull/85">go-viper/mapstructure#85</a></li>
    <li>Updates by <a
    href="https://github.com/sagikazarmark"><code>@​sagikazarmark</code></a>
    in <a
    href="https://redirect.github.com/go-viper/mapstructure/pull/86">go-viper/mapstructure#86</a></li>
    <li>build(deps): bump github/codeql-action from 2.13.4 to 3.28.15 by <a
    href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
    href="https://redirect.github.com/go-viper/mapstructure/pull/87">go-viper/mapstructure#87</a></li>
    <li>build(deps): bump actions/setup-go from 5.4.0 to 5.5.0 by <a
    href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
    href="https://redirect.github.com/go-viper/mapstructure/pull/93">go-viper/mapstructure#93</a></li>
    <li>build(deps): bump github/codeql-action from 3.28.15 to 3.28.17 by <a
    href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
    href="https://redirect.github.com/go-viper/mapstructure/pull/92">go-viper/mapstructure#92</a></li>
    <li>build(deps): bump github/codeql-action from 3.28.17 to 3.28.19 by <a
    href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
    href="https://redirect.github.com/go-viper/mapstructure/pull/97">go-viper/mapstructure#97</a></li>
    <li>build(deps): bump ossf/scorecard-action from 2.4.1 to 2.4.2 by <a
    href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
    href="https://redirect.github.com/go-viper/mapstructure/pull/96">go-viper/mapstructure#96</a></li>
    <li>Update README.md by <a
    href="https://github.com/peczenyj"><code>@​peczenyj</code></a> in <a
    href="https://redirect.github.com/go-viper/mapstructure/pull/90">go-viper/mapstructure#90</a></li>
    <li>Add omitzero tag. by <a
    href="https://github.com/Crystalix007"><code>@​Crystalix007</code></a>
    in <a
    href="https://redirect.github.com/go-viper/mapstructure/pull/98">go-viper/mapstructure#98</a></li>
    <li>Use error structs instead of duplicated strings by <a
    href="https://github.com/m1k1o"><code>@​m1k1o</code></a> in <a
    href="https://redirect.github.com/go-viper/mapstructure/pull/102">go-viper/mapstructure#102</a></li>
    <li>build(deps): bump github/codeql-action from 3.28.19 to 3.29.0 by <a
    href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
    href="https://redirect.github.com/go-viper/mapstructure/pull/101">go-viper/mapstructure#101</a></li>
    <li>feat: add common error interface by <a
    href="https://github.com/sagikazarmark"><code>@​sagikazarmark</code></a>
    in <a
    href="https://redirect.github.com/go-viper/mapstructure/pull/105">go-viper/mapstructure#105</a></li>
    <li>update linter by <a
    href="https://github.com/sagikazarmark"><code>@​sagikazarmark</code></a>
    in <a
    href="https://redirect.github.com/go-viper/mapstructure/pull/106">go-viper/mapstructure#106</a></li>
    <li>Feature allow unset pointer by <a
    href="https://github.com/rostislaved"><code>@​rostislaved</code></a> in
    <a
    href="https://redirect.github.com/go-viper/mapstructure/pull/80">go-viper/mapstructure#80</a></li>
    </ul>
    <h2>New Contributors</h2>
    <ul>
    <li><a href="https://github.com/tklauser"><code>@​tklauser</code></a>
    made their first contribution in <a
    href="https://redirect.github.com/go-viper/mapstructure/pull/85">go-viper/mapstructure#85</a></li>
    <li><a href="https://github.com/peczenyj"><code>@​peczenyj</code></a>
    made their first contribution in <a
    href="https://redirect.github.com/go-viper/mapstructure/pull/90">go-viper/mapstructure#90</a></li>
    <li><a
    href="https://github.com/Crystalix007"><code>@​Crystalix007</code></a>
    made their first contribution in <a
    href="https://redirect.github.com/go-viper/mapstructure/pull/98">go-viper/mapstructure#98</a></li>
    <li><a
    href="https://github.com/rostislaved"><code>@​rostislaved</code></a>
    made their first contribution in <a
    href="https://redirect.github.com/go-viper/mapstructure/pull/80">go-viper/mapstructure#80</a></li>
    </ul>
    <p><strong>Full Changelog</strong>: <a
    href="https://github.com/go-viper/mapstructure/compare/v2.2.1...v2.3.0">https://github.com/go-viper/mapstructure/compare/v2.2.1...v2.3.0</a></p>
    </blockquote>
    </details>
    <details>
    <summary>Commits</summary>
    <ul>
    <li><a
    href="https://github.com/go-viper/mapstructure/commit/8c61ec1924fcfa522f9fc6b4618c672db61d1a38"><code>8c61ec1</code></a>
    Merge pull request <a
    href="https://redirect.github.com/go-viper/mapstructure/issues/80">#80</a>
    from rostislaved/feature-allow-unset-pointer</li>
    <li><a
    href="https://github.com/go-viper/mapstructure/commit/df765f469ad16a1996fd0f0ae6a32b20535b966a"><code>df765f4</code></a>
    Merge pull request <a
    href="https://redirect.github.com/go-viper/mapstructure/issues/106">#106</a>
    from go-viper/update-linter</li>
    <li><a
    href="https://github.com/go-viper/mapstructure/commit/5f34b05aa12639380ef7c2af69eb6f8fd629dbd0"><code>5f34b05</code></a>
    update linter</li>
    <li><a
    href="https://github.com/go-viper/mapstructure/commit/36de1e1d74f55681536097ff8467a8ce952ef183"><code>36de1e1</code></a>
    Merge pull request <a
    href="https://redirect.github.com/go-viper/mapstructure/issues/105">#105</a>
    from go-viper/error-refactor</li>
    <li><a
    href="https://github.com/go-viper/mapstructure/commit/6a283a390ee7bc0f9331f58199db234902e0739f"><code>6a283a3</code></a>
    chore: update error type doc</li>
    <li><a
    href="https://github.com/go-viper/mapstructure/commit/599cb73236404c044abcf278a45c3928d7480dd0"><code>599cb73</code></a>
    Merge pull request <a
    href="https://redirect.github.com/go-viper/mapstructure/issues/101">#101</a>
    from go-viper/dependabot/github_actions/github/codeql...</li>
    <li><a
    href="https://github.com/go-viper/mapstructure/commit/ed3f92181528ff776a0324107b8b55026e93766a"><code>ed3f921</code></a>
    feat: remove value from error messages</li>
    <li><a
    href="https://github.com/go-viper/mapstructure/commit/a3f8b227dcdae324c070d389152837f0aa635f4b"><code>a3f8b22</code></a>
    revert: error message change</li>
    <li><a
    href="https://github.com/go-viper/mapstructure/commit/9661f6d07c319da00ae0508d99df5f3f0c3953bd"><code>9661f6d</code></a>
    feat: add common error interface</li>
    <li><a
    href="https://github.com/go-viper/mapstructure/commit/f12f6c76fe743c8e4cc6465c6a9f16fcd8cede57"><code>f12f6c7</code></a>
    Merge pull request <a
    href="https://redirect.github.com/go-viper/mapstructure/issues/102">#102</a>
    from m1k1o/prettify-errors2</li>
    <li>Additional commits viewable in <a
    href="https://github.com/go-viper/mapstructure/compare/v2.2.1...v2.3.0">compare
    view</a></li>
    </ul>
    </details>
    <br />
    
    
    [![Dependabot compatibility
    score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/go-viper/mapstructure/v2&package-manager=go_modules&previous-version=2.2.1&new-version=2.3.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
    
    Dependabot will resolve any conflicts with this PR as long as you don't
    alter it yourself. You can also trigger a rebase manually by commenting
    `@dependabot rebase`.
    
    [//]: # (dependabot-automerge-start)
    [//]: # (dependabot-automerge-end)
    
    ---
    
    <details>
    <summary>Dependabot commands and options</summary>
    <br />
    
    You can trigger Dependabot actions by commenting on this PR:
    - `@dependabot rebase` will rebase this PR
    - `@dependabot recreate` will recreate this PR, overwriting any edits
    that have been made to it
    - `@dependabot merge` will merge this PR after your CI passes on it
    - `@dependabot squash and merge` will squash and merge this PR after
    your CI passes on it
    - `@dependabot cancel merge` will cancel a previously requested merge
    and block automerging
    - `@dependabot reopen` will reopen this PR if it is closed
    - `@dependabot close` will close this PR and stop Dependabot recreating
    it. You can achieve the same result by closing it manually
    - `@dependabot show <dependency name> ignore conditions` will show all
    of the ignore conditions of the specified dependency
    - `@dependabot ignore this major version` will close this PR and stop
    Dependabot creating any more for this major version (unless you reopen
    the PR or upgrade to it yourself)
    - `@dependabot ignore this minor version` will close this PR and stop
    Dependabot creating any more for this minor version (unless you reopen
    the PR or upgrade to it yourself)
    - `@dependabot ignore this dependency` will close this PR and stop
    Dependabot creating any more for this dependency (unless you reopen the
    PR or upgrade to it yourself)
    You can disable automated security fix PRs for this repo from the
    [Security Alerts
    page](https://github.com/Khan/genqlient/network/alerts).
    
    </details>
    
    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Aug 2, 2025
    Configuration menu
    Copy the full SHA
    c1dac59 View commit details
    Browse the repository at this point in the history

Commits on Aug 14, 2025

  1. Fix test flake revealed by #308 (#393)

    Two issues here:
    - In the with-config tests, we were generating all the different input
    files into one output. This makes sense in user code, but in our tests,
    we reuse the same types all over the place, so not only is it confusing
    to read all the tests interleaved, it can cause nondeterminism anytime
    our conflict-detection is incomplete (#123). As it happens, #308
    introduced such a case, so tests started flaking. Fixes #281.
    - This turned the case introduced by #308 from a flake into a consistent
    failure. The issue is actually unrelated to the changes in the PR (it's
    intentional validation added in #338, and specifically corresponds to
    `errors/OmitemptyDirective.graphql` from that PR), so I changed the
    config for the test case to one that avoids the issue while still
    testing what we want.
    benjaminjkraft authored Aug 14, 2025
    Configuration menu
    Copy the full SHA
    27c858e View commit details
    Browse the repository at this point in the history
  2. chore: update dependencies to latest versions (#395)

    Updates several dependencies to their latest versions, including
    upgrading Go to version 1.23.0. Notable changes include:
    - Added `github.com/google/go-cmp` v0.6.0.
    - Upgraded `golang.org/x/mod` to v0.27.0, `golang.org/x/sync` to
      v0.16.0, and `golang.org/x/tools` to v0.36.0.
    These updates improve performance, security, and compatibility
    with other libraries.
    
    Fixes #394
    argoyle authored Aug 14, 2025
    Configuration menu
    Copy the full SHA
    01cfbc3 View commit details
    Browse the repository at this point in the history

Commits on Sep 10, 2025

  1. fix: typos and grammar isssues (#398)

    This PR fixes minor typos and grammatical issues across the project.
    
    I have:
    - [x] Written a clear PR title and description (above)
    - [x] Signed the [Khan Academy CLA](https://www.khanacademy.org/r/cla)
    - [ ] Added tests covering my changes, if applicable
    - [ ] Included a link to the issue fixed, if applicable
    - [ ] Included documentation, for new features
    - [x] Added an entry to the changelog
    NathanBaulch authored Sep 10, 2025
    Configuration menu
    Copy the full SHA
    7c070dd View commit details
    Browse the repository at this point in the history
Loading