Skip to content
This repository has been archived by the owner on Mar 31, 2024. It is now read-only.

fix(deps): update module github.com/99designs/gqlgen to v0.17.2 #58

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

renovate[bot]
Copy link

@renovate renovate bot commented Jan 15, 2022

WhiteSource Renovate

This PR contains the following updates:

Package Type Update Change
github.com/99designs/gqlgen require minor v0.14.0 -> v0.17.2

Release Notes

99designs/gqlgen

v0.17.2

Compare Source

v0.17.1

Compare Source

9f520a28 Update golangci-lint and fix resource leak (#​2024)
  • Fix golangci-lint in CI

  • Fix resource leak

v0.17.0

Compare Source

082bbff6 Revert "Update quickstart (#​1850](https://togithub.com/99designs/gqlgen/issues/1850))" ([#​2014)

This reverts commit 0ab6361.

45e192ea Clean up docs to clarify how to use a particular version (#​2015) (closes #​1851)

This reverts commit 57a148f.

  • Update getting-started.md

  • Update getting-started.md

5236fb09 fix introspection for description to be nullable (#​2008)
  • fixed introspection for description to be nullable

  • regenerated for integration

  • regenerated

  • fixed introspection package

  • regenerated

82fefdb5 support to generate model for intermediate interface (#​1982)
  • support to generate model for intermediate interface

  • go generate ./... in example

  • fixed filepath generation

3ec83635 Bump ajv from 6.10.2 to 6.12.6 in /integration (#​2007)

Bumps ajv from 6.10.2 to 6.12.6.


updated-dependencies:

  • dependency-name: ajv
    dependency-type: indirect
    ...
9546de2c Web Socket initialization message timeout (#​2006)
  • Added an optional timeout to the web socket initialization message read operation.

  • Added a fail message to a web socket init read timeout test.

f6ea6230 fixed introspection for schema description and specifiedByhttps://github.com/99designs/gqlgen (#​1986)
  • fixed introspection for schema description and specifiedByURL

  • updated to the master latest

  • fixed Description resolver

  • updated integration go file

  • fixed codegen tests for the latest gqlparser

  • updated go mod in example

  • go generate

  • skip specifiedBy

  • regenerate

  • fixed schema-expected.graphql for the latest

  • fixed integration test to use latest tools

  • fixed integration workflow

  • use v2.4.0

  • fixed sum

ffa857ef Websocket i/o timeout fix (#​1973)
  • Renamed "pingMesageType" to "pingMessageType" and refactored websocket_graphqlws.go to look more like websocket_graphql_transport_ws.go for the sake of consistency.

  • Made the keep-alive messages graphql-ws only, and the ping-pong messages graphql-transport-ws only (and added tests for it).

  • gofmt

d7da5b0d Merge pull request #​1958 from 99designs/cleanup-main

Cleanup main

42f32432 Merge pull request #​1957 from 99designs/move-init-ci

Upate init CI step

213a085b rename "example" dir to "_examples" (#​1734)
  • rename "example" dir to "_examples"

  • fix lint

  • Adjust permissions

9262b358 fix: typo in dataloader code sample (#​1954)
  • fix: typo in dataloader code sample

  • rename k to key for sample to compile

06bbca37 docs: migrate dataloaders sample to graph-gophers/dataloader (#​1871)
  • docs: add dataloader sample

  • finish example

  • add example

  • simplify method

  • replace old example

  • styling

  • Update docs/content/reference/dataloaders.md

  • Update docs/content/reference/dataloaders.md

  • Update docs/content/reference/dataloaders.md

  • Update docs/content/reference/dataloaders.md

f9fcfa16 Comment out autobind in the sample config file (#​1872)

The reason is that many people using it for the first time copy exactly that configuration example and then open the issues to say it doesn't work.

76a533b8 Bump gopkg.in/yaml.v2 from 2.2.4 to 2.2.8 (#​1858)
  • Bump gopkg.in/yaml.v2 from 2.2.4 to 2.2.8

Bumps gopkg.in/yaml.v2 from 2.2.4 to 2.2.8.


updated-dependencies:

  • dependency-name: gopkg.in/yaml.v2
    dependency-type: direct:production
    ...
  • Update go sum for example
eed4301c Bump node-fetch from 2.6.1 to 2.6.7 in /integration (#​1859)

Bumps node-fetch from 2.6.1 to 2.6.7.


updated-dependencies:

  • dependency-name: node-fetch
    dependency-type: direct:development
    ...
57a148f6 Remove outdated version reference so example is always for latest (#​1851)
  • Also update version reference to next

  • Update getting-started.md

a8eba26d Fix #​1777](https://togithub.com/99designs/gqlgen/issues/1777) by updating version constant and adding release checklist ([#​1848)
  • Revise to use script 🤦

v0.16.0

Compare Source

  • b90f975 Merge branch 'master' of github.com:99designs/gqlgen

  • 99523e4 Prepare for v0.16.0 release (#​1842)

  • 0563146 Prepare for v0.16.0 release

7cefef26 add PrependPlugin (#​1839)
  • add PrependPlugin

related: https://github.com/99designs/gqlgen/pull/1838

  • added test for PrependPlugin
972878a0 Revert "Fix plugin addition (#​1717](https://togithub.com/99designs/gqlgen/issues/1717))" ([#​1838)

This reverts commit f591c8f.

1ed7e050 Fix #​1832](https://togithub.com/99designs/gqlgen/issues/1832) [@​requires](https://togithub.com/requires) directive when [@​entityResolver](https://togithub.com/entityResolver) is used ([#​1833)
  • fix requires directive for multipleEntity directive

  • fix lint

fcee4c40 Update README.md (#​1836)

Corrected a simple grammar typo.

3fb5fd99 Fix #​1834](https://togithub.com/99designs/gqlgen/issues/1834): Implement federation correctly ([#​1835)
  • Fix federation implementation which does not conform to Apollo Federation subgraph specification

  • Optimize generated line breaks

  • Run go generate

98665071 Imporve gqlgen test cases (#​1773) (closes #​1765)
  • Imporve test cases for init and generate
5d904d87 Merge pull request #​1778 from ipfans/gh-pages-patch

Bump gqlgen.com version list

v0.15.1

Compare Source

  • 7102a36 Prepare for 0.15.1 release
2b8f50b3 Fix #​1765](https://togithub.com/99designs/gqlgen/issues/1765): Sometimes module info not exists or not loaded. ([#​1767)
  • Remove failing test

v0.15.0

Compare Source

931271a2 Fix #​1762](https://togithub.com/99designs/gqlgen/issues/1762): Reload packages before merging type systems ([#​1763)
  • run gofmt on file
57664bf0 Migrate playgrounds to GraphiQL (#​1751)
  • migrate to GraphiQL playground

  • fix lint

b2a832d5 Avoid problems with `val` being undefined in the federation template. (#​1760)
  • Avoid problems with val being undefined in the federation template.

When running gqlgen over our schema, we were seeing errors like:

assignments/generated/graphql/service.go:300:4: val declared but not used

The generated code looks like this:

func entityResolverNameForMobileNavigation(ctx context.Context, rep map[string]interface{}) (string, error) {
        for {
                var (
                        m   map[string]interface{}
                        val interface{}
                        ok  bool
                )
                m = rep
                if _, ok = m["kaid"]; !ok {
                        break
                }
                m = rep
                if _, ok = m["language"]; !ok {
                        break
                }
                return "findMobileNavigationByKaidAndLanguage", nil
        }
        return "", fmt.Errorf("%w for MobileNavigation", ErrTypeNotFound)
}

Looking at the code, it's pretty clear that this happens when there
are multiple key-fields, but each of them has only one keyField.Field
entry. This is because the old code looked at len(keyFields) to
decide whether to declare the val variable, but looks at
len(keyField.Field) for each keyField to decide whether to use the
val variable.

The easiest solution, and the one I do in this PR, is to just declare
val all the time, and use a null-assignment to quiet the compiler
when it's not used.

  • run go generate to update generated files

  • run go generate to update moar generated files

  • Adding a test for verify that this fixes the issue.

From plugins/federation, run the following command and verify that no errors are produced

go run github.com/99designs/gqlgen --config testdata/entityresolver/gqlgen.yml
47015f12 Added pointer to a solution for `no Go files` err (#​1747)

While following the instructions in this getting started guide I run into this error package github.com/99designs/gqlgen: no Go files which was pretty annoying to fix. Its a golang issue but for people who are unfamiliar with how the go generate command works in vendored projects its a blocker trying to follow the rest of this guide. It will be really nice to at least have a pointer in the guide for people to find a possible solution to the issue while going through the guide. I'm sure many folks have run into this issue given vendoring is now very popular with the latest go releases.

14cfee70 Support for multiple @​key](https://togithub.com/key) directives in federation (reworked) ([#​1723)
  • address review comments
  • reworked code generation for federation.go
  • better checking for missing/incorrect parameters to entity resolver functions
  • better tests for generated entity resolvers

Still missing:

  • suggested test for autobind vs non-autobind generation
  • could probably clean up generated code spacing, etc
44beadc1 Fix list coercion when using graphql variables (#​1740)
  • fix(codegen): support coercion of lists in graphql variables

This was broken by an upstream dependency gqlparser coercing variables during validation. this has broken the existing coercion process withing gqlgen

  • test: add list coercion integration tests

  • chore: regenerate generated code

  • test: update expected schema for integration tests

  • chore: run goimports

  • chore: regenerate examples

bd8938d8 fix: automatically register built-in directive goTag (#​1737)
  • fix: automatically register built-in tag goTag

  • doc: add directive config documentation

497227fa Close Websocket Connection on Context close/cancel (#​1728)
  • Added code to the web socket so it closes when the context is cancelled (with an optional close reason).

  • Added a test.

  • go fmt

  • Fix linter issues about the cancel function being thrown away.

213ecd93 Add support for graphql-transport-ws with duplex ping-pong (#​1578)
  • Add support for graphql-transport-ws with duplex ping-pong

  • Add tests for the duplex ping-pong

af33b7cd Cleaning up extra return in federation generated code (#​1713)

In PR 1709, I introduced GetMany semantics for resolving federated entities. But I left a couple of extra return statements in the generated code that are not necessary. So Im just cleaning those up here.

Also added go:generate in federation entity resolver tests to make it simpler to test.

To test:

go generate ./... && cd example/ && go generate ./... && cd ..
go test -race ./... && cd example && go test -race ./... && cd ..
402a2259 Optimize performance for binder, imports and packages (Rebased from sbalabanov/master) (#​1711)
  • Cache go.mod resolution for module name search

  • Optimize binder.FindObject() for performance by eliminating repeatitive constructs

  • Optimize allocations in packages.Load() function

  • Optimize binder.FindObject() by indexing object definitions for each loaded package

  • goimports to fix linting

50292e99 Resolve multiple federated entities in a single entityResolve call (#​1709)
  • Resolve multiple federated entities in a single entityResolve call

Entity resolver functions can only process one entity at a time. But often we want to resolve all the entities at once so that we can optimize things like database calls. And to do that you need to add you'd need to add batching with abstractions like dataloadgen or batchloader. The drawback here is that the resolver code (the domain logic) gets more complex to implement, test, and debug.

An alternative is to have entity resolvers that can process all the representations in a single call so that domain logic can have access to all the representations up front, which is what Im adding in this PR.

There are a few moving pieces here:
3. When that's configured, the federation plugin will create an entity resolver that will take a list of representations.

Please note that this is very specific to federation and entity resolvers. This does not add support for resolving fields in an entity.

Some of the implementation details worth noting. In order to efficiently process batches of entities, I group them by type so that we can process groups of entities at the same time. The resolution of groups of entities run concurrently in Go routines. If there is only one type, then that's just processed without concurrency. Entities that don't have multiget enabled will still continue to resolve concurrently with Go routines, and entities that have multiget enabled just get the entire list of representations.

The list of representations that are passed to entity resolvers are strongly types, and the type is generated for you.

There are lots of new tests to ensure that there are no regressions and that the new functionality still functions as expected. To test:

  1. Go to plugin/federation
  2. Generate files with go run github.com/99designs/gqlgen --config testdata/entityresolver/gqlgen.yml
  3. And run go test ./.... Verify they all pass.

You can look at the federated code in plugin/federation/testdata/entityresolver/gederated/federation.go

  • Added InputType in entity to centralize logic for generating types for multiget resolvers.

  • reformat and regenerate

80713b84 Adding entity resolver tests for errors, entities with different type… (#​1708)
  • Adding entity resolver tests for errors, entities with different types, and requires

The tests in this PR are for ensuring we get the expected errors from entity resolvers, that we also handle resolving entities where the representations are for different types, and that requires directive works correctly.

To run tests:

  1. Go to plugin/federation
  2. Generate files with go run github.com/99designs/gqlgen --config testdata/entityresolver/gqlgen.yml
  3. And run go test ./.... Verify they all pass.
  • Fixed test for errors
  • ed2d699 Replace ! with _ in root.generated file to avoid build conflicts (#​1701)
828820af transport: implement `graphql-transport-ws` ws sub-protocol (#​1507)
  • websocket: create messageExchanger to handle subprotocol messages

  • remove unused type

  • typo in comments

  • change graphqlwsMessageType type to string

  • add support for graphql-transport-ws subprotocol

  • fix chat app example

  • update example chat app dependencies

  • improve chat app exmaple to use the recommended ws library

  • add tests

  • removed unused const in tests

  • Update example/chat/readme.md

01d3c4f8 Entity resolver tests (#​1697)
  • Moving federation tests to their own folders

Reorganizing the tests in the federation plugin a little bit so make it simpler to add more safely without testdata colliding. This is in anticipation for a follow up PR for adding entity resolver tests.

Run the tests with go test ./plugin/federation/... and verify they all pass. Also verify that the testdata/allthething directory has a generated directory specific to that test.

NOTE: There is a catch all type of test that I moved to the directory allthething. Open to suggestions for a better name! One potential thing to considere here is to split up the tests that use that testdata and break them down into more specific tests. E.g. Add a multikey test in the testdata/entity. For now, Im leaving that as a TODO.

  • Adding entity resolver tests in the federation plugin

The tests work by sending _entities queries with representation variables directly to the mocked server, which will allow us to test generated federation code end to end. For context, the format of the entity query is something like:

query($representations:[_Any!]!){_entities(representations:$representations){ ...on Hello{secondary} }}

And representations are the list of federated keys for the entities being resovled, and they look like

representations: [{
   "__typename": "Hello",
   "name":       "federated key value 1",
}, {
   "__typename": "Hello",
   "name":       "federated key value 2",
}]

The entity resolver tests are in plugin/federation/federation_entityresolver_test.go and they rely on plugin/federation/testdata/entityresolver.

To run the tests:

  1. Build the entityresolver testdata
  • From plugin/federation, run go run github.com/99designs/gqlgen --config testdata/entityresolver/gqlgen.yml
  1. Run the tests with go test ./... or similar
b7db36d3 Revert "Support for multiple @​key](https://togithub.com/key) directives in federation ([#​1684](https://togithub.com/99designs/gqlgen/issues/1684))" ([#​1698)

This reverts commit 47de912.

47de912f Support for multiple @​key](https://togithub.com/key) directives in federation ([#​1684)
  • add more unit test coverage to plugin/federation
59a30919 Reimplement goTag using FieldMutateHook (#​1682)
  • Reimplement goTag using a FieldMutateHook

This change does not change the logic of goTag, merely reimplements it using a FieldMutateHook and sets it as the default FieldMutateHook for the modelgen plugin.

  • Add repeated tag test
37a4e7ee Rename `@​extraTag](https://togithub.com/extraTag)` directive to `[@goTag](https://togithub.com/goTag)` and make repeatable ([#​1680)
  • Allow Repeatable goTag Directive

  • Default to field name if none provided

  • Update Docs

87f9e436 Fix nil pointer dereference when an invalid import is bound to a model (#​1676)
  • Fixes remaining Name field in singlefile test

  • Fixes nill pointer dereference when an invalid import is bound to a model

  • Only return error if we failed to find type

  • Revert "Fixes remaining Name field in singlefile test"

This reverts commit e43ebf7.

  • Undo change of log.Println -> fmt.Println

Totally accidental, sorry!

6c65e8f1 Update getting-started.md (#​1674)

missing an 's' on quoted filename default

  • 3bbc2a3 feat: generate resolvers for inputs if fields are missing (#​1404)
7db941a5 Fix 1138: nested fieldset support (#​1669)
  • formatting

  • update federation schema to latest Apollo spec

also:
handle extra spaces in FieldSet
upgrade deps in federation integration tests

488a31fc ContextMarshaler (#​1652)
  • Add interface and detection for ContextMarshaler

  • Test error on float marshalling

  • Revert prettier changes

  • Rename context test

  • Only use the erroring float printer

  • Test that context is passed to marshal functions

  • Update scalar docs to include the context

  • Generate the examples

  • Move ContextMarshaller test code to new followschema

  • Resolve conflict a little more

  • Replicate sclar test for singlefile

8b973717 Update directives doc page (#​1660)
  • Update directives doc page

  • Add back one beloved piece of jargon

1f500016 Add follow-schema layout for exec (#​1309) (closes #​1265)
  • Define ExecConfig separate from PackageConfig

When support for writing generated code to a directory instead of
a single file is added, ExecConfig will need additional fields
that will not be relevant to other users of PackageConfig.

  • Add single-file, follow-schema layouts

When ExecLayout is set to follow-schema, output generated code to a
directory instead of a single file. Each file in the output directory
will correspond to a single *.graphql schema file (plus a
root!.generated.go file containing top-level definitions that are not
specific to a single schema file).

ExecLayout defaults to single-file, which is the current behavior, so
this new functionality is opt-in.

These layouts expose similar functionality to the ResolverLayouts with
the same name, just applied to exec instead of resolver.

  • Rebase, regenerate
12978359 Update GQLgen test client to work with multipart form data (take 2) (#​1661)
  • Update GQLgen test client to work with multipart form data

Update the GQLgen to support multipart form data, like those present
within the fileupload examples.

  • Add missing space between "unsupported encoding " and failing
    content-type header error

(cherry picked from commit 101842f)

  • Add WithFiles client option for fileupload GQLgen client tests

Add a WithFiles GQLgen client option to support the fileupload input
within tests, using the core Golang os package and File type, which
converts os.Files to their appropriate multipart form data within a
request.

  • If there are no files this should just simply convert a
    application/json Content-Type to supported multipart/form-data

(cherry picked from commit 08ef942)

  • Update fileupload test to use GQLgen test client

Update the fileupload test to use the GQLgen test client and WithFiles
option to remove the need for createUploadRequest helper with raw http
posts

(cherry picked from commit 5e573d5)

  • Update WithFiles option test with multipart Reader

(cherry picked from commit 6dfa3cb)

  • Update file upload tests WithFiles option

Update the file upload tests to use the GQL test client and its
WithFiles option to remove the need for a custom raw HTTP post request
builder createUploadRequest.

  • Also update WithFiles option to group & map identical files; e.g.

      { "0": ["variables.req.0.file", "variables.req.1.file"] }
    

(cherry picked from commit 486d9f1)

  • Make sure WithFiles does not add duplicates to multipart form data

(cherry picked from commit 0c2364d)

  • Fix use of byte vs string in WithFiles tests

(cherry picked from commit ba10b5b)

  • Fix strict withFiles option test for race conditions

Fix a problem with how strict the test's expected response was for tests
with files in their request, since it always expected a strict order of
files input that is somewhat random or dependent on what OS it is
running the test on and/or race condition

7435403c Adds RootFieldInterceptor to extension interfaces (#​1647)
  • Adds RootFieldInterceptor to extension interfaces

  • Regenerates example folder

  • Re-generate after changes

  • 8b25c9e Add a config option to skip running "go mod tidy" on code generation (#​1644)
658195b7 Revert "Update GQLgen test client to work with multipart form data (#​1418](https://togithub.com/99designs/gqlgen/issues/1418))" ([#​1659)

This reverts commit 1318f12.

1318f127 Update GQLgen test client to work with multipart form data (#​1418)
  • Update GQLgen test client to work with multipart form data

Update the GQLgen to support multipart form data, like those present
within the fileupload examples.

  • Add missing space between "unsupported encoding " and failing
    content-type header error
  • Add WithFiles client option for fileupload GQLgen client tests

Add a WithFiles GQLgen client option to support the fileupload input
within tests, using the core Golang os package and File type, which
converts os.Files to their appropriate multipart form data within a
request.

  • If there are no files this should just simply convert a
    application/json Content-Type to supported multipart/form-data
  • Update fileupload test to use GQLgen test client

Update the fileupload test to use the GQLgen test client and WithFiles
option to remove the need for createUploadRequest helper with raw http
posts

  • Update WithFiles option test with multipart Reader

  • Update file upload tests WithFiles option

Update the file upload tests to use the GQL test client and its
WithFiles option to remove the need for a custom raw HTTP post request
builder createUploadRequest.

  • Also update WithFiles option to group & map identical files; e.g.

      { "0": ["variables.req.0.file", "variables.req.1.file"] }
    
  • Make sure WithFiles does not add duplicates to multipart form data

  • Fix use of byte vs string in WithFiles tests

f6c35be2 Add ReplacePlugin option to replace a specific plugin (#​1657)
  • Add Helper Option for replacing plugins

  • Update recipe to use ReplacePlugin instead of NoPlugin and AddPlugin

  • fix linting issue on comment

f8c46600 fix double indirect bug (#​1604) (closes #​1587)
  • invalid code generated

  • update code generation for pointer-to-pointer updating


Configuration

📅 Schedule: At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, click this checkbox.

This PR has been generated by WhiteSource Renovate. View repository job log here.

@renovate renovate bot force-pushed the renovate/github.com-99designs-gqlgen-0.x branch from 0baa74c to df18322 Compare January 16, 2022 19:56
@renovate renovate bot changed the title fix(deps): update module github.com/99designs/gqlgen to v0.15.0 fix(deps): update module github.com/99designs/gqlgen to v0.15.1 Jan 16, 2022
@renovate renovate bot force-pushed the renovate/github.com-99designs-gqlgen-0.x branch from df18322 to a2a6907 Compare January 24, 2022 22:00
@renovate renovate bot changed the title fix(deps): update module github.com/99designs/gqlgen to v0.15.1 fix(deps): update module github.com/99designs/gqlgen to v0.16.0 Jan 24, 2022
@renovate renovate bot force-pushed the renovate/github.com-99designs-gqlgen-0.x branch from a2a6907 to 143d512 Compare March 2, 2022 04:06
@renovate renovate bot changed the title fix(deps): update module github.com/99designs/gqlgen to v0.16.0 fix(deps): update module github.com/99designs/gqlgen to v0.17.0 Mar 2, 2022
@renovate renovate bot force-pushed the renovate/github.com-99designs-gqlgen-0.x branch from 143d512 to 2ff5cdb Compare March 2, 2022 14:46
@renovate renovate bot changed the title fix(deps): update module github.com/99designs/gqlgen to v0.17.0 fix(deps): update module github.com/99designs/gqlgen to v0.17.1 Mar 2, 2022
@renovate renovate bot force-pushed the renovate/github.com-99designs-gqlgen-0.x branch from 2ff5cdb to a170484 Compare March 21, 2022 14:35
@renovate renovate bot changed the title fix(deps): update module github.com/99designs/gqlgen to v0.17.1 fix(deps): update module github.com/99designs/gqlgen to v0.17.2 Mar 21, 2022
@renovate renovate bot force-pushed the renovate/github.com-99designs-gqlgen-0.x branch from a170484 to 82dc8c2 Compare March 31, 2022 13:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant