gqlgen v0.15.0 Release Notes
Release Date: 2022-01-14 // over 2 years ago-
- ๐ 99be1951 Prepare for release
๐ฆ 931271a2 Fix #1762: Reload packages before merging type systems (#1763)
- โ run gofmt on file
- ๐ e5b5e832 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)- 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 theval
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 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 producedgo 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 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.- โฌ๏ธ 27a2b210 Downgrade to Go 1.16 (#1743)
๐ 14cfee70 Support for multiple @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
- 2747bd5f Add CSV and PDF to common initialisms (#1741)
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 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.
- 4581fccd 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
โ ae92c83d add federation tests (#1719)
๐ f591c8f7 Fix plugin addition (#1717)
8fa6470f Fix #1704: 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:
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
- ๐ 237a7e6a Separate golangci-lint from other jobs (#1712)
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 withgo run github.com/99designs/gqlgen --config testdata/entityresolver/gqlgen.yml
โ 3. And rungo 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 withgo run github.com/99designs/gqlgen --config testdata/entityresolver/gqlgen.yml
โ 3. And rungo test ./...
. Verify they all pass.- ๐ Fixed test for errors
- ๐ ed2d6998 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
โ 28caa6ce Ignore generated files from test coverage (#1699)
๐ 7ac988de Fix linting issue
โ 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 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.- โ Adding entity resolver tests in the federation plugin
โ 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: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 likerepresentations: [{ "__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 onplugin/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
โ 2. Run the tests withgo test ./...
or similar
โช b7db36d3 Revert "Support for multiple @key directives in federation (#1684)" (#1698)
โช This reverts commit 47de912f56cd4bd6da9b74929cd67b8881617026.
- ๐ 4a4b5601 DOC: Fixed indention in example code. (#1693)
๐ 47de912f Support for multiple @key directives in federation (#1684)
- โ add more unit test coverage to plugin/federation
59a30919 Reimplement goTag using FieldMutateHook (#1682)
- Reimplement goTag using a FieldMutateHook
0๏ธโฃ 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://github.com/extraTag)
directive to[@goTag](https://github.com/goTag)
and make repeatable (#1680)๐ Allow Repeatable
goTag
Directive0๏ธโฃ 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 e43ebf7aa80f884afdb3feca90867b1eff593f01.
- ๐จ Undo change of log.Println -> fmt.Println
Totally accidental, sorry!
โก๏ธ 6c65e8f1 Update getting-started.md (#1674)
0๏ธโฃ missing an 's' on quoted filename default
- 3bbc2a34 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
a626d9b4 Add ICMP to common initialisms (#1666)
๐ db4b5eb7 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)
- ๐ฆ 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 tofollow-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).0๏ธโฃ
ExecLayout
defaults tosingle-file
, which is the current behavior, so this new functionality is opt-in.These layouts expose similar functionality to the
ResolverLayout
s with the same name, just applied toexec
instead ofresolver
.- 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 101842f73fb79b10c1299bb40506080e08543ec6)
- โ 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 Golangos
package and File type, which convertsos.File
s 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 supportedmultipart/form-data
(cherry picked from commit 08ef942416c98a2cadf61223308a3ff3c879d1c9)
- โก๏ธ 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 forcreateUploadRequest
helper with raw http posts๐ Fix setting the Content Type by using the appropriate
http
package function to dectect it
(cherry picked from commit 5e573d51440eba9d457adb4186772577b28ef085)
- โก๏ธ Update WithFiles option test with multipart Reader
(cherry picked from commit 6dfa3cbe0647138e80a59a0c1d55dd9c900f96f2)
- โก๏ธ 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 ๐ buildercreateUploadRequest
.- โก๏ธ Also update
WithFiles
option to group & map identical files; e.g.
{ "0": ["variables.req.0.file", "variables.req.1.file"] }
(cherry picked from commit 486d9f1b2b200701f9ce6b386736a633547c1441)
- ๐ Make sure
WithFiles
does not add duplicates to multipart form data
(cherry picked from commit 0c2364d8495553051d97ab805618b006fcd9eddb)
- ๐ Fix use of byte vs string in
WithFiles
tests
(cherry picked from commit ba10b5b1c52a74e63e825ee57c235254e8821e0d)
- ๐ 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
- 8b25c9e0 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)" (#1659)
โช This reverts commit 1318f12792e86c76a2cdff9132ebac5b3e30e148.
โช 41c86765 Revert 1595 (#1658)
โฌ๏ธ 8359f974 Allow custom websocket upgrader (#1595)
โก๏ธ 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 Golangos
package and File type, which convertsos.File
s 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 supportedmultipart/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 forcreateUploadRequest
helper with raw http posts๐ Fix setting the Content Type by using the appropriate
http
package function to dectect itโก๏ธ 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 ๐ buildercreateUploadRequest
.- โก๏ธ 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
- 6758654c raise panic when nested @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
๐ 629c91a2 remove extra WithOperationContext call (#1641)
35199c49 codegen: ensure Elem present before using (#1317)
๐ฆ bfea93cd Reload config packages after generating models (#1491)
๐ฆ If models are generated in a package that has already been loaded, and ๐ฆ that package refers to another package that has already been loaded, we can find ourselves in a position where it appears that a GQL
union
is not satisfied.For example, if we have:
union Subject = User
with this gqlgen.yml in github.com/wendorf/gqlgen-error/gql:
schema: - schema.graphql exec: filename: generated.go model: filename: models_gen.go models: User: model: github.com/wendorf/gqlgen-error/gql.User Subject: model: github.com/wendorf/gqlgen-error/models.Subject
Note that our User model is in the github.com/wendorf/gqlgen-error.gql ๐ฆ package, and our models_gen.go will be generated in that same package.
When we try to run gqlgen, we get this error:
merging type systems failed: unable to bind to interface: github.com/wendorf/gqlgen-error/gql.User does not satisfy the interface github.com/wendorf/gqlgen-error/models.Subject
Digging deeper, it's because we use types.Implements in codegen/interface.go, which does a shallow object comparison. Because the type has been reloaded, it refers to a different interface type object than the one we're comparing against, and get a false negative.
๐ฆ By clearing the package cache and repopulating it, the whole package ๐ฆ cache is generated at the same time, and comparisons across packages work.
๐ To see a demo of this, check out https://github.com/wendorf/gqlgen-error and try the following:
๐ 1. Checkout the works-with-v0.10.2 branch and
go generate ./...
to see that it works- Checkout the breaks-with-v0.13.0 branch (or run go get to see errors
- Checkout the works-with-pull-request branch and
go generate ./...
to see that it works again. This branch adds a go.mod replace directive to use the gqlgen code in this PR.
๐ The demo starts at v0.10.2 since it is the last release without this problem. https://github.com/99designs/gqlgen/pull/1020 introduces the code that fails in this scenario.
9e0817cd Add graphql schema aware field level hook to modelgen (#1650)
- โ Add ast aware field level hook to modelgen
๐ Currently, the only mechanism for extending the model generation is to use a BuildMutateHook at the end of the model generation process. This can be quite limiting as the hook only has scope of the model build and not the graphql schema which has been parsed.
๐ This change adds a hook at the end of the field creation process which provides access to the parsed graphql type definition and field definition. This allows for more flexibility for example adding additional tags to the model based off custom directives
โ Add recipe for using the modelgen FieldMutateHook
๐ fix goimport linting issue in models_test
af2ac061 handling unconventional naming used in type names (#1549)
handling unconventional naming used in type names
๐ Fix merge resolution mistake
๐ Fix merge resolution mistake
393f7554 add extraTag directive (#1173)
๐ fd1bd7c9 adding support for sending extension with gqlgen client (#1633)
589a7742 Enable lowercase type names in GraphQL schema to properly render (#1359)
The difficulty with lowercased type names is that in go code any lowercased name is not exported. This change makes the names title case for go code while preserving the proper case when interacting with the GraphQL schema.
- โก๏ธ 50f6a2aa Fixes #1653: update docs and wrap error if not *gqlerror.Error (#1654)
7081dedb Bump tmpl from 1.0.4 to 1.0.5 in /integration (#1627)
โฌ๏ธ Bumps tmpl from 1.0.4 to 1.0.5.
- ๐ Release notes
- Commits
โก๏ธ updated-dependencies:
- dependency-name: tmpl dependency-type: indirect ...
5287e4e5 Add QR and KVK to common initialisms (#1419)
โ Add QR and KVK to common initialisms
โก๏ธ Update templates.go
Sort commonInitialisms
โก๏ธ f9df1a46 Update time format for
Time
scalar (#1648)๐ Use more precise time format
โก๏ธ update test
โก๏ธ update docs
Apply suggestions from code review
โก๏ธ Update scalars.md
๐ 77c757f0 Merge pull request #1640 from minus7/master
๐ Fix example run instructions
๐ e60dc7af Merge pull request #1619 from Khan/benkraft.mod-tidy-stdout
Forward
go mod tidy
stdout/stderr๐ 0c63f1d1 Merge pull request #1515 from OpenSourceProjects/time
Marshaling & Unmarshaling time return initial value
๐ a3d9e8ce Remove redundant favicon (#1638)
0๏ธโฃ 210c1aa6 Appropriately Handle Falsy Default Field Values (#1623)
47ce074a Fix example run instructions (closes #1607)
Making ./example a separate Go module [1] broke the
go run
invocations listed in a few example readmes [2]. Using relative paths from the respective example directory should be clear enough.[2]: ๐ฆ example/todo/server/server.go:10:2: no required module provides package github.com/99designs/gqlgen/example/todo; to add it: go get github.com/99designs/gqlgen/example/todo
- โก๏ธ 1a0b19fe Update README.md
๐ d9998283 Merge pull request #1628 from robertmarsal/patch-1
๐ Fix typo in the getting-started docs
- ๐ f93f73ac Fix typo in the getting-started docs
๐ 2f6919ff Merge pull request #1624 from FlymeDllVa/master
โก๏ธ Update disabling Introspection
โก๏ธ c53bc0e5 Update disabling Introspection
โก๏ธ 880cd73d Update README.md
โก๏ธ eec81df0 Update README.md
43b56cba Forward
go mod tidy
stdout/stderrThis is a command that can fail (in my case I think for stupid reasons in a hell of my own construction, but nonetheless). Right now we just get
$ go run github.com/Khan/webapp/dev/cmd/gqlgen tidy failed: go mod tidy failed: exit status 1 exit status 3
which is not the most informative. Now, instead, we'll forward its output to our own stdout/stderr rather than devnull.
๐ ce7a8ee4 Fix link in docs
โก๏ธ 488cf7e8 Update docs/content/getting-started.md
โก๏ธ 73809f69 Update getting started
โก๏ธ b938e558 Update README.md
โก๏ธ cacd49a6 Update README.md
โก๏ธ 7d549d64 Merge pull request #1617 from 99designs/update-docs-for-go1.17
โก๏ธ Update docs for getting started
โก๏ธ 5c52f27c Update docs for getting started
41d6926f Replace gitter with discord in contributing.md
โก๏ธ 24d4edcf Update README.md
โก๏ธ 2272e05b Update README.md
๐ ef4d4a38 Merge pull request #1614 from 99designs/go-1.16
โ Also test against 1.16
- โ 00ed6fb1 Also test against 1.16
๐ 473f0671 Merge pull request #1613 from 99designs/bump-non-module-deps
Clean up non-module deps
- 6960c0c2 Bump non-module deps
โก๏ธ bf9b34aa Merge pull request #1612 from 99designs/update-linter
โก๏ธ Update golangci linter
๐ 85e7a4a0 Linting fixes
โก๏ธ 777dabde Update the linter
๐ 85dd47bb Merge pull request #1607 from 99designs/example-module
[POC/RFC] Split examples into separate go module
- f93fb248 Split examples into separate go module
๐ 890f5f66 Merge pull request #1610 from 99designs/go-1.17
โก๏ธ Update to go 1.17
9162c53f Fix newlines in error messages
โก๏ธ f67a5b26 Update github.com/urfave/cli/v2
๐ 1116ea6c Merge pull request #1608 from jjmengze/patch-1
๐ fix Options response header
71e57843 Simplify init
a8903ca2 Wrap errors
โก๏ธ a644175b Update error checks for go 1.17
c6b9f292 go mod tidy
๐ฆ 1c63cfff Add missing model package file
๐ฆ 59da23fe Create a temporary file on init so go recognises the directory as a package
682a7d66 fix Options response header
operatee the header of ResponseWriter should before WriteHeader called
๐ ed8054b0 Update to a post-release version
โ 5216db58 Fix TestAutobinding test failure by checking the module
90c5eb59 go generate
402f4495 go fmt
10bb1ef2 Go mod tidy
โก๏ธ ed210385 Update to go 1.17
5c7acc1b Fix imports
โก๏ธ d7473870 Update plugin/servergen/server.go
โก๏ธ a6c6de6b Update plugin/resolvergen/resolver.go
โก๏ธ de7d19c8 Update codegen/config/config_test.go
โก๏ธ 60d80d4a Update cmd/gen.go
โก๏ธ a991e3e7 Update errors to use go1.13 semantics
๐ 8f179be9 Merge pull request #1581 from tsh96/master
Bypass complexity limit on __Schema queries.
๐ 5048f992 Merge pull request #1525 from Code-Hex/fix/support-input-object
๐ support input object directive
๐ 1e2b303a Merge pull request #1526 from epulze/fix/allow-more-types
๐ allow more than 10 different import sources with types
๐ e7df3e5c Merge pull request #1405 from alexsn/subsciption-complete-on-panic
subscriptions: send complete message on resolver panic
๐ 06e4fe88 Merge pull request #1529 from mathieupost/master
Return type loading errors in config.Binder.FindObject
๐ a557c90c Merge pull request #1340 from bickyeric/master
serialize ID just like String
๐ 522cab59 Merge pull request #1285 from Khan/benkraft.federation
Resolve requests for federation entities in parallel
โ 5adb73bb add bypass __schema field test case
54cef3dd Bypass complexity limit on __Schema queries.
f0ccab79 Return type loading errors in config.Binder.FindObject
91b54787 generated go code
๐ 1efc152e supported INPUT_OBJECT directive
e82b401d allow more than 10 different import sources with types
481a4e44 Marshaling & Unmarshaling time return initial value
There was a lack of symmetry that would prevent times for being ๐ symmetrical. That is because time.Parse actually parses an RFC3339Nano implicitly, thereby allowing nanosecond resolution on unmarshaling a time. Therefore we now marshal into nanoseconds, getting more information into GraphQL times when querying for a time, and restoring the symmetry
95653193 Resolve requests for federation entities in parallel (closes #1278)
In apollo federation, we may be asked for data about a list of entities. These can typically be resolved in parallel, just as with sibling fields in ordinary GraphQL queries. Now we do!
I also changed the behavior such that if one lookup fails, we don't cancel the others. This is more consistent with the behavior of other resolvers, and is more natural now that they execute in parallel. This, ๐จ plus panic handling, required a little refactoring.
The examples probably give the clearest picture of the changes. (And the โ clearest test; the changed functionality is already exercised by โ
integration-test.js
as watching the test server logs will attest.)f00e2c3f subscriptions: send complete message on resolver panic
fa371b9b serialize ID just like String
<!-- end of Commits --> <!-- end of Else -->
<!-- end of If NoteGroups -->