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 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.

    • โฌ‡๏ธ 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 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.

    • 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 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
    • ๐Ÿ— 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 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 โœ… 2. Run the tests with go 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 Directive

    • 0๏ธโƒฃ 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 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).

    0๏ธโƒฃ 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 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 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 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 for createUploadRequest helper with raw http posts

    (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 ๐Ÿ— 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 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 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

    • ๐Ÿ›  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 ๐Ÿ— 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

    • 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

    1. Checkout the breaks-with-v0.13.0 branch (or run go get to see errors
    2. 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.


    โšก๏ธ 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/stderr

    This 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 -->