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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
v0.14.0
->v0.17.2
Release Notes
99designs/gqlgen
v0.17.2
Compare Source
1f04d38
release v0.17.287fc5f2
Fix #1961][https://github.com/99designs/gqlgen/issues/1961](https://togithub.com/99designs/gqlgen/issues/1961)1) for Go 1.18 ([#2052)f85d59d
fixed modelgen test schema (#2032)d873ff8
v0.17.1 postrelease bumpv0.17.1
Compare Source
5ea50ae
release v0.17.1a493a42
Prepare for new release9f520a28 Update golangci-lint and fix resource leak (#2024)
Fix golangci-lint in CI
Fix resource leak
74baaa1
fixed model gen for multiple implemented type (#2021)d31cf6b
v0.17.0 postrelease bumpv0.17.0
Compare Source
e4be565
release v0.17.0082bbff6 Revert "Update quickstart (#1850](https://togithub.com/99designs/gqlgen/issues/1850))" ([#2014)
This reverts commit
0ab6361
.a58411b
Embed templates instead of inlining them (#2019)839b50d
Test gqlgen generate in CI (#2017)00dc14a
Remove ambient imports (#2016)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
3a9413f
Fix issue template5236fb09 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-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
f17ca15
Fix broken links in docs (#1983) (closes #1734)a0c856b
Added a callback error handling function to the websocket and added tests for it. (#1975)cfea9f0
generate resolvers for input types (#1950)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
be16474
Cleanup main8ea290c
Upate init CI step56bfb18
Fix 1955: only print message on @key](https://github.com/key) found on interfaces ([#1956)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
a054373
remove autobind example (#1949)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.
a30b68d
fix: whitelist VERSION and CURRENT_VERSION env vars (#1870)76a533b8 Bump gopkg.in/yaml.v2 from 2.2.4 to 2.2.8 (#1858)
Bumps gopkg.in/yaml.v2 from 2.2.4 to 2.2.8.
updated-dependencies:
dependency-type: direct:production
...
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-type: direct:development
...
7f5dce6
Fix #1776][https://github.com/99designs/gqlgen/issues/1776](https://togithub.com/99designs/gqlgen/issues/1776)6) : Edit and persist headers in GraphiQL ([#1856)e0b42f9
fix requires directive with nested field when entityResolver directive is used (#1863)25c2cdc
Fix #1636][https://github.com/99designs/gqlgen/issues/1636](https://togithub.com/99designs/gqlgen/issues/1636)6) by updating gqlparser ([#1857)c161ab3
fix #1770][https://github.com/99designs/gqlgen/issues/1770](https://togithub.com/99designs/gqlgen/issues/1770)0) minor error in getting-started.md ([#1771)57a148f6 Remove outdated version reference so example is always for latest (#1851)
Also update version reference to next
Update getting-started.md
0ab6361
Update quickstart (#1850)a8eba26d Fix #1777](https://togithub.com/99designs/gqlgen/issues/1777) by updating version constant and adding release checklist ([#1848)
v0.16.0
Compare Source
b90f975
Merge branch 'master' of github.com:99designs/gqlgen99523e4
Prepare for v0.16.0 release (#1842)0563146
Prepare for v0.16.0 release7cefef26 add PrependPlugin (#1839)
related: https://github.com/99designs/gqlgen/pull/1838
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)
5d904d87 Merge pull request #1778 from ipfans/gh-pages-patch
Bump gqlgen.com version list
196ee13
Bump gqlgen.com versionv0.15.1
Compare Source
7102a36
Prepare for 0.15.1 release2b8f50b3 Fix #1765](https://togithub.com/99designs/gqlgen/issues/1765): Sometimes module info not exists or not loaded. ([#1767)
46502e5
fixed broken link (#1768)v0.15.0
Compare Source
99be195
Prepare for release931271a2 Fix #1762](https://togithub.com/99designs/gqlgen/issues/1762): Reload packages before merging type systems ([#1763)
e5b5e83
Improve performance of MarshalBoolean (#1757)57664bf0 Migrate playgrounds to GraphiQL (#1751)
migrate to GraphiQL playground
fix lint
b2a832d5 Avoid problems with `val` being undefined in the federation template. (#1760)
val
being undefined in the federation template.When running gqlgen over our schema, we were seeing errors like:
The generated code looks like this:
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)
todecide whether to declare the
val
variable, but looks atlen(keyField.Field)
for each keyField to decide whether to use theval
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 compilerwhen 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 produced47015f12 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 thego 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.27a2b21
Downgrade to Go 1.16 (#1743)14cfee70 Support for multiple @key](https://togithub.com/key) directives in federation (reworked) ([#1723)
Still missing:
2747bd5
Add CSV and PDF to common initialisms (#1741)44beadc1 Fix list coercion when using graphql variables (#1740)
This was broken by an upstream dependency
gqlparser
coercing variables during validation. this has broken the existing coercion process withinggqlgen
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.
4581fcc
Don't loose field arguments when none match (#1725)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
ae92c83
add federation tests (#1719)f591c8f
Fix plugin addition (#1717)8fa6470
Fix #1704][https://github.com/99designs/gqlgen/issues/1704](https://togithub.com/99designs/gqlgen/issues/1704)4): handle @required nested fields as in @key ([#1706)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:
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
237a7e6
Separate golangci-lint from other jobs (#1712)50292e99 Resolve multiple federated entities in a single entityResolve call (#1709)
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:
plugin/federation
go run github.com/99designs/gqlgen --config testdata/entityresolver/gqlgen.yml
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)
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:
plugin/federation
go run github.com/99designs/gqlgen --config testdata/entityresolver/gqlgen.yml
go test ./...
. Verify they all pass.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 messagesremove unused type
typo in comments
change
graphqlwsMessageType
type to stringadd support for
graphql-transport-ws
subprotocolfix 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
28caa6c
Ignore generated files from test coverage (#1699)7ac988d
Fix linting issue01d3c4f8 Entity resolver tests (#1697)
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 agenerated
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.The tests work by sending
_entities
queries withrepresentation
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:And
representations
are the list of federated keys for the entities being resovled, and they look likeThe entity resolver tests are in
plugin/federation/federation_entityresolver_test.go
and they rely onplugin/federation/testdata/entityresolver
.To run the tests:
go run github.com/99designs/gqlgen --config testdata/entityresolver/gqlgen.yml
go test ./...
or similarb7db36d3 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
.4a4b560
DOC: Fixed indention in example code. (#1693)47de912f Support for multiple @key](https://togithub.com/key) directives in federation ([#1684)
59a30919 Reimplement goTag using FieldMutateHook (#1682)
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.
37a4e7ee Rename `@extraTag](https://togithub.com/extraTag)` directive to `[@goTag](https://togithub.com/goTag)` and make repeatable ([#1680)
Allow Repeatable
goTag
DirectiveDefault 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
.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
a626d9b
Add ICMP to common initialisms (#1666)db4b5eb
Merge Inline Fragment Nested Interface Fields (#1663)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)
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.
When
ExecLayout
is set tofollow-schema
, output generated code to adirectory 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 tosingle-file
, which is the current behavior, sothis new functionality is opt-in.
These layouts expose similar functionality to the
ResolverLayout
s withthe same name, just applied to
exec
instead ofresolver
.12978359 Update GQLgen test client to work with multipart form data (take 2) (#1661)
Update the GQLgen to support multipart form data, like those present
within the fileupload examples.
content-type header error
(cherry picked from commit
101842f
)Add a
WithFiles
GQLgen client option to support the fileupload inputwithin tests, using the core Golang
os
package and File type, whichconverts
os.File
s to their appropriate multipart form data within arequest.
application/json
Content-Type to supportedmultipart/form-data
(cherry picked from commit
08ef942
)Update the fileupload test to use the GQLgen test client and
WithFiles
option to remove the need for
createUploadRequest
helper with raw httpposts
Fix setting the Content Type by using the appropriate
http
packagefunction to dectect it
(cherry picked from commit
5e573d5
)(cherry picked from commit
6dfa3cb
)WithFiles
optionUpdate the file upload tests to use the GQL test client and its
WithFiles
option to remove the need for a custom raw HTTP post requestbuilder
createUploadRequest
.Also update
WithFiles
option to group & map identical files; e.g.(cherry picked from commit
486d9f1
)WithFiles
does not add duplicates to multipart form data(cherry picked from commit
0c2364d
)WithFiles
tests(cherry picked from commit
ba10b5b
)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
.41c8676
Revert 1595 (#1658)8359f97
Allow custom websocket upgrader (#1595)1318f127 Update GQLgen test client to work with multipart form data (#1418)
Update the GQLgen to support multipart form data, like those present
within the fileupload examples.
content-type header error
Add a
WithFiles
GQLgen client option to support the fileupload inputwithin tests, using the core Golang
os
package and File type, whichconverts
os.File
s to their appropriate multipart form data within arequest.
application/json
Content-Type to supportedmultipart/form-data
Update the fileupload test to use the GQLgen test client and
WithFiles
option to remove the need for
createUploadRequest
helper with raw httpposts
Fix setting the Content Type by using the appropriate
http
packagefunction to dectect it
Update WithFiles option test with multipart Reader
Update file upload tests
WithFiles
optionUpdate the file upload tests to use the GQL test client and its
WithFiles
option to remove the need for a custom raw HTTP post requestbuilder
createUploadRequest
.Also update
WithFiles
option to group & map identical files; e.g.Make sure
WithFiles
does not add duplicates to multipart form dataFix use of byte vs string in
WithFiles
tests6758654
raise panic when nested @requires](https://github.com/requires) are used on federation ([#1655)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
629c91a
remove extra WithOperationContext call (#1641)[
35199c4
](https://togithub.com/9Configuration
📅 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.
This PR has been generated by WhiteSource Renovate. View repository job log here.