All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
v0.16.0 - 2022-01-24
7cefef26 add PrependPlugin (#1839)
- add PrependPlugin
related: 99designs#1838
- added test for PrependPlugin
972878a0 Revert "Fix plugin addition (#1717](https://github.com/99designs/gqlgen/issues/1717))" ([#1838)
This reverts commit f591c8f797e35635fb5eb0e4465c77b6a073896b.
1ed7e050 Fix #1832](https://github.com/99designs/gqlgen/issues/1832) [@requires](https://github.com/requires) directive when [@entityResolver](https://github.com/entityResolver) is used ([#1833)
-
fix requires directive for multipleEntity directive
-
fix lint
-
3fb5fd99 Fix #1834](https://github.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
-
- 196ee13b Bump gqlgen.com version
v0.15.1 - 2022-01-16
- 7102a36b Prepare for 0.15.1 release
v0.15.0 - 2022-01-14
- 99be1951 Prepare for release
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
- Avoid problems with
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.
14cfee70 Support for multiple @key](https://github.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 withinggqlgen
-
test: add list coercion integration tests
-
chore: regenerate generated code
-
test: update expected schema for integration tests
-
chore: run goimports
-
chore: regenerate examples
-
8fa6470f Fix #1704](99designs#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
-
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:
- Go to
plugin/federation
- Generate files with
go run github.com/99designs/gqlgen --config testdata/entityresolver/gqlgen.yml
- 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:
- Go to
plugin/federation
- Generate files with
go run github.com/99designs/gqlgen --config testdata/entityresolver/gqlgen.yml
- And run
go test ./...
. Verify they all pass.
- Fixed test for errors
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 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:
- Build the entityresolver testdata
- From plugin/federation, run
go run github.com/99designs/gqlgen --config testdata/entityresolver/gqlgen.yml
- Run the tests with
go test ./...
or similar
b7db36d3 Revert "Support for multiple @key](https://github.com/key) directives in federation ([#1684](https://github.com/99designs/gqlgen/issues/1684))" ([#1698)
This reverts commit 47de912f56cd4bd6da9b74929cd67b8881617026.
47de912f Support for multiple @key](https://github.com/key) directives in federation ([#1684)
- add more unit test coverage to plugin/federation
37a4e7ee Rename `@extraTag](https://github.com/extraTag)` directive to `[@goTag](https://github.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 e43ebf7aa80f884afdb3feca90867b1eff593f01.
- Undo change of log.Println -> fmt.Println
Totally accidental, sorry!
-
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
-
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).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
658195b7 Revert "Update GQLgen test client to work with multipart form data (#1418](https://github.com/99designs/gqlgen/issues/1418))" ([#1659)
This reverts commit 1318f12792e86c76a2cdff9132ebac5b3e30e148.
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](https://github.com/requires) are used on federation ([#1655)
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:
- 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. 99designs#1020 introduces the code that fails in this scenario.
- Checkout the works-with-v0.10.2 branch and
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
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](99designs#1653): update docs and wrap error if not *gqlerror.Error ([#1654)
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
- f93f73ac Fix typo in the getting-started docs
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
-
5c52f27c Update docs for getting started
-
41d6926f Replace gitter with discord in contributing.md
-
24d4edcf Update README.md
-
2272e05b Update README.md
- 00ed6fb1 Also test against 1.16
- 6960c0c2 Bump non-module deps
- f93fb248 Split examples into separate go module
-
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
-
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
v0.14.0 - 2021-09-08
- 56451d92 release v0.14.0
- db6154b9 Update README.md
- cc957171 Merge branch 'master' into patch-1
fd133c0b Bump normalize-url from 4.5.0 to 4.5.1 in /integration
Bumps normalize-url from 4.5.0 to 4.5.1.
updated-dependencies:
- dependency-name: normalize-url dependency-type: indirect ...
13db6111 Bump browserslist from 4.14.0 to 4.17.0 in /integration
Bumps browserslist from 4.14.0 to 4.17.0.
updated-dependencies:
- dependency-name: browserslist dependency-type: indirect ...
94e9406e Bump hosted-git-info from 2.8.5 to 2.8.9 in /integration
Bumps hosted-git-info from 2.8.5 to 2.8.9.
updated-dependencies:
- dependency-name: hosted-git-info dependency-type: indirect ...
36be94ff Bump node-fetch from 2.6.0 to 2.6.1 in /integration
Bumps node-fetch from 2.6.0 to 2.6.1.
updated-dependencies:
- dependency-name: node-fetch dependency-type: direct:development ...
29133c11 Fix spaces -> tabs typo in authentication.md
The indentation here was supposed to be a tab rather than spaces so the readme was off.
01b25c55 Bump path-parse from 1.0.6 to 1.0.7 in /integration
Bumps path-parse from 1.0.6 to 1.0.7.
updated-dependencies:
- dependency-name: path-parse dependency-type: indirect ...
eb36f04f Return introspection document in stable order
This avoids spurious changes when generating client code using something like graphql-codegen.
843edd9e Update apq.md function definition mismatch
line 67: cache, err := NewCache(cfg.RedisAddress, 24*time.Hour) line 41: func NewCache(redisAddress string, password string,ttl time.Duration) (*Cache, error)
either password should be removed from 41 or added in line 67 Proposed the first one for now.
-
4e881981 Bump to gqlparser v2.2.0
-
1d768a29 Add test covering single element -> slice coercion
-
f57d1a02 Bump gqlparser to master & support repeated directives
3cfc5b14 codegen/config: restore current working directory after changing it
Before this commit, a call to config.LoadConfigFromDefaultLocations changed the working directory to the directory that contains the gqlgen config file.
This commit changes the implementation to restore the working directory after loading the config.
-
5f21f9d9 Remove chi from dataloader example
-
e02db808 Run go mod tidy after code generation
-
8c3e64e1 Improve APQ documentation
-
03b57f3e Run go mod tidy
-
54e387c4 Resolve indirect dependency vulnerability in example
-
1fac78e9 Add test case for nullable field
-
469e31bd Fix bad test case
-
635b1aef Add Test Case
-
0b5da15c Check in generated code
-
55b774ba Fix type ref
-
45903a65 Handle nillable list elements
-
c4bf36c5 Add coveralls badge
-
269a58ad Add goreportcard badge
-
971da82c Updated gin.md
-
41ad51ce Edited the Gin-Gonic Recipe Docs
-
67e652ad getting started: separate example mutation/query
-
31d339ab getting started: make running server own section
-
aa531ed8 getting started: more wording updates
-
5b2531ae getting started: wording update
-
ada1b928 getting started: updating wording around implementing unimpl fns
-
23eec791 go generate ./...
18678b15 Fix data race
The argument of unmarshalInput may be the same for concurrent use if it pass as graphql "variables". So we have to copy it before setting default values
-
02b14003 fomatted query indent
-
0e9d9c3a updated sample code for disabling introspection
-
478c3f08 feat(codegen): handle (v, ok) methods
5ef5d14f Update cors.md
I had problems reading this page and applying it to my project. With these changes it worked on my end
1123ba0d Update gin.md
Changed this:
In your router file, define the handlers for the GraphQL and Playground endpoints in two different methods and tie then together in the Gin router:
to:In your router file, define the handlers for the GraphQL and Playground endpoints in two different methods and tie them together in the Gin router:
89a9f743 Remove stale bot
We tried it, but it's just causing more work both for maintainers and reporters of errors.
4628ef84 Dont hold error lock when calling into error presenters
This can result in a deadlock if error handling code calls GetErrors.
- d0d5f7db bugfix: Default Recover func should return gqlerror.Error
18b5df19 codegen/config: Add a new API to finish an already-validated config
LoadConfig parses the config from yaml, but it does a bunch of other things too. We want to parse the config ourselves, so that we can have extra fields which will be passed to our plugins. Right now, that means we either have to duplicate all of LoadConfig, or write the config back to disk only to ask gqlgen re-parse it.
In this commit, I expose a new function that does all the parts of LoadConfig other than the actual YAML-reading: that way, a caller who wants to parse the YAML themselves (or otherwise programmatically compute the config) can do so without having to write it back to disk.
An alternative would be to move all this logic to Config.Init(), but that could break existing clients. Either way would work for us.
- 1e8c34e5 Dont export Input
- 09756915 Update introspection docs
-
94252e04 singleUpload consistency
-
c9d346f5 Fix small typo in file upload docs
-
9f851619 add uint, uint64, uint32 types in graphql
0625525f Update introspection.md
updated disabling interospect
-
c6a93aa7 split layout components to their own part, makes sample more readable
-
7904ef6f channel is switchable too
-
13752055 add some layout for demo :)
82ca6e24 Create package declaration to run dataloaden
ref: vektah/dataloaden#35
-
bf549136 use Apollo docs styling for the gql var uppercase
-
36045a37 do not autofocus
-
0502228a chore: update example to React hooks and latest Apollo client
-
e6e64224 update deps
-
789d02f5 Requested changes
-
130ed3f7 Fix different alias with same name in inline fragment
-
f4669ba9 v0.13.0 postrelease bump
-
07c06594 Update README.md
-
1c9f24b2 remove triming space for schemaDefault
v0.13.0 - 2020-09-21
- 77aeb477 Point latest docs to v0.12.2
e821b97b Always wrap user errors (closes #1305)
Requires use of go 1.13 error unwrapping.
On measure I think I prefer this approach, even though it's a bigger BC break:
- There's less mutex juggling
- It has never felt right to me that we make the user deal with path when overriding the error presenter
- The default error presenter is now incredibly simple
Questions:
- Are we comfortable with supporting 1.13 and up?
- Should we change the signature of
ErrorPresenterFunc
tofunc(ctx context.Context, err *gqlerror.Error) *gqlerror.Error
?- It always is now, and breaking BC will force users to address the requirement for
errors.As
- It always is now, and breaking BC will force users to address the requirement for
-
8b2a023c Fix typos in README.md
-
3e5dd956 add test for FieldContext.IsResolver
-
1524989b go generate
-
55951163 add IsResolver to FieldContext
4c11d9fa Update getting-started.md
fix typo
- b4375b04 v0.12.2 postrelease bump
v0.12.2 - 2020-08-18
- 03cebf20 release v0.12.2
-
a87c54ad Allow rewriter to work on empty but potentially importable ckages
-
8a7f3e64 clean code
-
fd0f97ce avoid computing field path when getting field errors
-
2d59b684 ran fmt on test
-
3a153075 ran fmt
-
defd7119 added test
-
9fcdbcd1 fix panic test
-
473d63c0 change name to alias
-
849e3eac added check for object defination name
-
08eee0fc v0.12.1 postrelease bump
v0.12.1 - 2020-08-14
v0.12.0 - 2020-08-14
- 70302123 Version 0.12.0
- bef9c8bf Add comments and docs for pointer scalars
997efd03 Reintroduce special cast case for string enums
This reverts commit 89960664d05f0e93ed629a22753b9e30ced2698f.
-
8561c056 Replace awkward loop in buildTypes with recursion
-
d65b04f9 Clean up generated code
-
e1c463a4 Linting
-
89960664 Remove unused special cast case for string enums
-
196954bc Bind directly to pointer types when possible, instead of always binding to value types
-
5b3d08db Update README.md
-
efd33dab Update README.md
-
f35b162f Fixed transport not support issue
- dbbda22e go 1.14
-
bde4291c shadow context to ensure scoped context use
-
c43990a0 Merge remote-tracking branch 'origin/master' into HEAD
-
6be2e9df fix fileupload example
-
fbfdd41c Merge pull request #1262 from sateeshpnv/gqlparser-alias (closes #1258)
-
99fafc9f issue [#1258] explicitly add gqlparser alias to vektah/gqlparser/v2 import
-
49291f23 fix bug in OBJECT directive
-
b81138da Add test for nillable input slice
-
14d1a4dc Only return nil for nilable types when the graphql spec would allow it
- d11f6021 Do not use pointers on named map types
- 77b37bb2 Indentation misprint
- 71182de8 Update dataloaders.md
-
2c1f2345 Update feature comparison for federation (closes #5)
-
e19d43bc Adding test
-
4a62f012 Adding ContentType header to GET request responses
-
f5de4731 Add timeout to integration test
- d347d972 Update stale.yml
-
c5bfe9d3 Update gorilla/websocket to v1.4.2 to resolve vulnerability
-
55c16e93 doc: fix typo in embedded struct example
-
89eb1993 codegen: add PGP to common initialisms
-
9ab7294d apollotracing: skip field interceptor when on no tracing extension
-
6518d839 Upgrade to OperationContext and remove duplicate fields to fix 99designs#1161
-
632904ad Update outdated examples in errors doc
-
0921915d Update getting-started.md
-
1610039e updated generated code
-
905e1aad fix redundant type warning
-
39ded924 fix ctx
-
e7798ff2 insert operation context
-
6f78c6ac Add links to godoc to the README and docsite
-
35a90482 Add LoadDefaultConfig to load the schema by default
-
07a5494b Fix typo in docs
04b120c9 Update APQ example to reflect newer API
The example in APQ relates to the old handlers. This brings it up to show how extensions can be used - and uses the new API for registering plugins that come in the graph.
The cache example now implements the graphql.Cache interface
- 55e0f0db Check in a place where
Entity
might be nil now.
1ecd0749 Handle the case that all entities are "empty extend".
In that case, there are no resolvers to write, so we shouldn't emit any.
- 0e2666fb Run
go fmt
36b5ed83 Actually, we need to check all-external, not all-key.
We might well be defining our own type that has only key-fields, but if they're not external then we're the primary provider of the type
Test plan: go test ./plugin/federation/
7e3f5844 Do not require a resolver for "empty" extended types.
Summary: If our schema has a field with a type defined in another service, then we need to define an "empty extend" of that type in this service, so this service knows what the type is like. But the graphql-server will never ask us to actually resolve this "empty extend", so we don't require a resolver function for it. Example:
type MyType { myvar: TypeDefinedInOtherService } // Federation needs this type, but it doesn't need a resolver for // it! graphql-server will never ask *us* to resolve a // TypeDefinedInOtherService; it will ask the other service. extend TypeDefinedInOtherService @key(fields: "id") { id: ID @extends }
Test Plan: I manually tested this on a service (
assignments
) that we have that fell afoul of this problem. But I had a hard time adding tests inside gqlgen because the error happens at validation-time, and the federation tests are not set up to go that far down the processing path.Reviewers: benkraft, lizfaubell, dhruv
Subscribers: #graphql
Differential Revision: https://phabricator.khanacademy.org/D61883
-
9c80bb5b type Person -> type Person struct
-
ea210929 add test for object directive
-
5c3812cb merge object directives to field directives
-
8ea5ba2b Fix additional missed tests
-
65be2a6e Run generate
-
fd615cf6 Fix linting
-
61fa9903 Add documentation for scalad error handling
-
1aa20f25 Add test to highlight usecase
-
d98ff1b0 Modify templates to include deeper context nesting
dfb6558a run CI on PRs
PRs from outside the org arent running CI, hopefully this fixes it.
- 5149231c delete unused code
6f81ff92 Update Query Complexity Documentation
- This pass at the documentation updates the appropriate section regarding query complexity, specifically in the way that the http.Handler is created.
- The deprecated handler.GraphQL calls were replaced with NewDefaultServer.
- Instead of passing along the fixed query complexity as a second argument to the now deprecated handler.GraphQL func, extension.FixedComplexityLimit is used instead.
v0.11.3 - 2020-03-13
-
97896eeb exec codegen.GenerateCode before plugin GenerateCode to fast
-
44f8ba9f Update licence
-
94701fb7 add Enable federation section in federation doc
-
64190309 Update upload docs with Apollo usage
-
a5381191 v0.11.2 postrelease bump
v0.11.2 - 2020-03-05
- 2ccc0aa6 release v0.11.2
- b82ee517 Fix CI badge
- cd2b53f2 remove os.Exits
-
a84d6577 graphql/handler: revive the existing around func types
-
f9bb017b graphql/executor_test: ensure operation trace is started before every query
-
57dd8d9c graphql/gqlgen: remove unnecessary convenience method
-
fb86f7b9 graphql/executor: remove the naked return
-
9ae6bc0b graphql/executor: reinit all extension values on every Use() call
-
f3909a8a graphql/executor: make ext funcs private
-
df9e7ce3 Run CI on push only
-
ed76bc92 Update badge
-
5a1a5446 Coveralls fixes
-
41acc753 Fix windows line endings
-
390cea4f Replace Appveyor with Github Actions
-
85be072f Replace CircleCI with Github Actions
-
8d540db3 fix: Add Upload.ContentType test
-
f21832af fix: Fixed Upload type document
-
3a61dc00 Fix unlink file path in resolvergen test
-
df5ac929 Fix test data
-
b2843f67 Remove unused code
-
cff73f71 Add ContentType to Upload
f0ebc0df Fix a typo in sql example
I think todo is referenced to user by user_id field, not by todo.id
- 22a43d77 fix server path
1388fa94 Fix mismatching documentation of Todo struct
Mismatch between the code and the getting started documentation.
-
294884ad Rollback go.sum and go.mod as per feedback of @vektah
-
d8acf165 Upgrade to github.com/urfave/cli/v2
-
81bcbe75 suppress golint messages
24813079 Add practical example of getting all the requested fields
Based on this 99designs#954 was tagged as 'need documentation'
-
95e453bf Add function to check presense of operation context
-
36365c41 graphql/executor: move setExtensions()
-
3acc9421 graphql/executor: ensure Executor implements graphql.GraphExecutor.
-
f89b973b graphql/executor: merge ExtensionList into Executor
-
c16a77c3 graphql/handler: replace internal executor type
-
8fa26cec graphql/executor: extract an Executor type from graphql/handler
-
d5d780c5 Point latest docs to 0.11.1
-
abaa0a04 v0.11.1 postrelease bump
v0.11.1 - 2020-02-19
- 11af15a1 release v0.11.1
- 2c3853c8 fix whitespace in comparison
-
26ee1aa1 docs(gin): missing import playground
-
3abe5b32 add test
-
6ecdb88d Merge branch 'master' into feat-check-len
-
2340f7a7 Ensure panic handlers get applied
-
4c47ad16 Fix link to examples directory in Federation docs
-
2506dce0 check slice len
-
1a68df34 fix origin/master reference in switcher
-
199cfedf remove old docs that no longer run with new layout
-
556c8484 fix paths
-
282100c8 use current layout to build old doc content
-
4c38b8b4 v0.11.0 postrelease bump
v0.11.0 - 2020-02-17
- 368597aa release v0.11.0
- 11f97936 Update 0.11 migration docs
-
b2d9bfcb Update stale.yml
-
1ac8b5ae Update stale.yml
-
4b9dfa61 trim underscores from around go identifiers
14dccc57 Merge pull request #1022 from 99designs/feat-gqlparser-117
example about apply vektah/gqlparser#117
- cf6f7683 bump to gqlparser v2
-
9638ce0f Fix format
-
51b921fa Fix format
-
07ffcc82 Respect includeDeprecated for EnuValues
-
d58434c9 propagate resolver errors to response error in ResponseMiddleware
-
59855925 go mod tidy
-
e4530da6 apply vektah/gqlparser#117
- b7a58a1c Handle interfaces that implement interfaces
- 3045b2cf Federation docs and examples
- 8850a527 Create a non generated federation _Entity type
- 652aa2fb propagate errors to response context in DispatchError
- ad3c1c81 Allow configuring the federation output file location
65401637 Adding type with multiple keys to federation test
Summary: The current federation test schema only has types with single keys (or no keys). Adding a type with multiple keys, including one non-String key, to test compound key federation code gen.
Test Plan: - go test
Reviewers: csilvers, miguel
Differential Revision: https://phabricator.khanacademy.org/D60715
3f714a46 Extending federation to support compound keys per Apollo spec
Summary: Compound keys are not yet supported for federation in gqlgen. This diff adds support by modifying the federation plugin to handle a list of key fields on an entity rather than a single top-level key field. It will now look for "findBy..." in the resolver, rather than the original "FindBy". The federation plugin does not yet support more complicated FieldSets in the key, such as nested selections.
References:
- Apollo federation spec: https://www.apollographql.com/docs/apollo-server/federation/federation-spec/
- Selection sets: https://graphql.github.io/graphql-spec/draft/#sec-Selection-Sets
Will update https://phabricator.khanacademy.org/D59469 with multiple key changes.
Test Plan:
- Tested Go GQL services using both single- and multiple-key federated types (assignments and content-library in webapp/services)
- Ran gqlgen on non-federated services in webapp to ensure regular generation still works (donations service)
- WIP: creating unit tests; will submit as separate diff
Reviewers: briangenisio, dhruv, csilvers, O4 go-vernors
Reviewed By: dhruv, csilvers, O4 go-vernors
Differential Revision: https://phabricator.khanacademy.org/D59569
9f2a624b Make sure there's a Query node before trying to add a field to it.
Federation adds some queries to the schema. There already existed code to insert a Query node if none existed previously. But that code was only put on addEntityToSchema(), and not the other place we update the query, addServiceToSchema().
Almost always the old code was good enough, since we call addEntityToSchema() before addServiceToSchema(). But there's on addServiceToSchema(), so we need to do the query-existence check there too.
-
95b10809 bump appveyor go version for consistent behavour
-
91a9ff97 fix bad copy from template
-
d5d6f830 Give an appropriate error message when autoload isnt a valid package
- 6bf88417 fix chat example
- 9ccd7ed7 Cache all packages.Load calls in a central object
-
cf4a3eb4 keep imports when scattering resolvers between files
-
da7c1e45 Update getting started docs
-
c233876e fix windows test paths
-
93713a29 Add tests for code persistence
-
3e507e0d separate resolver stubs by 1 empty line
-
8a208af5 add tests covering ResolverConfig
-
f8e61961 set init to use new resolvers by default
-
dbaf355d copy through any unknown data
-
e7255580 copy old imports through before gofmt prunes
-
6ec36504 Copy existing resolver bodies when regenerating new resolvers
-
9e3b399d add resolver layout = follow-schema
-
8a18895e Update to latest golangci-lint
fa884991 Correctly generate a federated schema when no entity has a `[@key](https://github.com/key)`.
Normally, when a service is taking part in graphql federation, it will services can link to (that is, have an edge pointing to) the type that this service provides. The previous federation code assumed that was the case.
types. It might seem that would mean the service is unreachable, since there is no possibility of edges into the service, but there are and top level Mutation edges. That is, if a service only provides a top-level query or top-level mutation, it might not need to define a
This commit updates the federation code to support that use case.
-
30c295c4 Remove empty lines on DirectiveRoot generation
-
85cfa8a3 Add context.Context to graphql.Cache interface's methods
- 76035df5 Fix intermittent websocket ka test failure
-
4dd10086 fix test race by only stubbing now where we need to
-
8dbce3cf Capture the time spent reading requests from the client
-
7f6f1667 bump x/tools for consistent import formatting
-
842fcc11 review feedback
-
f0bea5ff Allow customizing http and websocket status codes for errors
-
bd50bbcb single packages.Load for NameForPackage
ac67050a fix: explicitly exclude trailing comma from link
- this looks dumb, but when the page is rendered, the link resolves with the comma, despite the comma being excluded in github rendering.
-
4e95b363 fix some version switcher paths
-
08369dfe add missing trailing slash on paths
-
ea347ca7 fetch all tags
-
8c1a8f57 fix branch switching
-
324efc5c add origin if missing
-
cfa2907a Generate docs for all tags
f49936eb Add Link to Sample Project with GQLGen and Postgres
This is a very straightforward project with numerous details in the README and the official documentation, but questions continue to pop up around how to use this project, organize the files and ultimately make data calls to some persistent layer.
The
https://github.com/oshalygin/gqlgen-pg-todo-example
was built in order to show newcomers the following:- How to organize their graphql schema, resolvers, dataloaders and models
- How to create a new dataloader
- How to resolve with a dataloader and how to avoid some of the pitfalls(inconsistent db query to keys array order)
- How to map models from a gql schema to structs
While the examples in this project are helpful, they could benefit from more elaborate explanations in the code as well as the README to help newcomers get started. This PR is not intended to portray any of the examples negatively and should not be interpreted as such. There are many findings/lessons learned from the work that folks put together in those examples.
README which covers a ton of the details on how to use this project:
-
db499561 force rebuild
-
0985a78e remove debug comments
-
7f648425 add preliminary test_data
-
c9d6d94b add preliminary tests
-
2345936e fix integration
-
aae7486d go generate
-
555a9546 go generate + remove directives nil check
-
368d546d Apollo Federation MVP
-
21e0e676 Fix extra trimspace on nillable Unmarshals
-
f869f5a8 remove deprected handler call
-
f0b83cb1 fix merge conflict
-
cdf96721 update generated code
-
21356ce3 markdown cleanup
-
922db1e3 always return OperationContext for postpone process
-
8794f03e v0.10.2 postrelease bump
-
14dbf1aa use new handler package in new test
-
a339a042 panic if operation context is missing when requested
-
a13a0f5f add docs on extension name conventions
-
458fa0de Add more interface assertions
-
d0836b72 Expose APQ stats
-
cf14cf10 fix: Fix no code generation for only interfaces
-
dc76d029 Merge remote-tracking branch 'origin/master' into handler-refactor
-
572fb419 remove all references to deprecated handler package
-
dc622346 Tune allocs for benchmarks
-
a6f94626 Merge remote-tracking branch 'origin/master' into handler-refactor
-
c3f93810 fix benchmark
-
631b48a5 remove automatic field stat collection to reduce time calls
-
a77d9fc2 Add generated stanzas back in
-
0ee185b8 fix duplicate header sends
-
7cbd75db fix APQ signature
-
67fa2104 allow extensions to declare their own stats
-
e9502ae0 Make extensions validatable
-
fc727c9c Add a signpost method to handler extension interface
-
0a39ae20 add fixed complexity limit
-
f2ef5ec3 more deprecations and more compat
-
2898a622 rename ResolverContext to FieldContext
-
092ed95f collect field timing in generated code
-
848c627c remove DirectiveMiddleware
-
40f08868 add NewDefaultServer
-
1b57bc3e Rename RequestContext to OperationContext
-
3476ac44 fix linting issues
-
479abbef update generated code
-
bc981569 Combine root handlers in ExecutableSchema into a single Exec method
-
473a0d25 Implement bc shim for old handler package
-
631142cf move writer all the way back to the transport
-
c7bb03a8 merge executable schema entrypoints
-
e7e913d9 Remove remains of old handler package
-
8c5340c1 Add complexity limit plugin
-
0965420a Add query document caching
-
aede7d1c Add multipart from transport
-
64cfc9ad extract shared handler test server stubs
-
a70e93bc consistently name transports
-
9d1d77e6 split context.go into 3 files
-
72c47c98 rename result handler to response handler
-
4a69bcd0 Bring operation middleware inline with other handler interfaces
-
ab5665ad Add result context
-
c3dbcf83 Add apollo tracing
-
f00e5fa0 use plugins instead of middleware so multiple hooks can be configured
-
a7c5e660 build middleware graph once at startup
-
2e0c9cab mark validation and parse errors separately to execution errors
-
cb99b42e Add websocket transport
-
eed1515c Split middlware out of handler package
-
b5089cac Split transports into subpackage
-
d0f68303 port json post
-
afe241b5 port over tracing
-
311887d6 convert APQ to middleware
-
da986181 port over the setter request context middleware
-
249b602d Start drafting new handler interfaces
v0.10.2 - 2019-11-28
- f276a4e6 release v0.10.2
-
4db0e6ec keep function private
-
c06f05b3 add doc
-
bd353b3e add skip_validation flag
-
b829628d shortcut QualifyPackagePath in go module mode
-
3a05d2dd add mention in the docs
-
c2c2d7de make model generation optional
- ba3d0189 graph-gophers now supports Struct Field resolvers
63be1d5e Merge pull request [#1](99designs#1) from lulucas/modelgen-hook-patch-1
modelgen hook docs use plugin poitner
33fc16b1 modelgen hook docs use plugin poitner
and add modelgen package to ModelBuild type
- fcfe595e Add a comment
59946087 Add unit test for the interface resolver / typed nil interaction
This added test shows that the
_Dog_species
automatically generated resolver will crash unless the extra nil check is added ininterface.gotpl
.
- 201768f0 Regenerate examples
85ca9efe Return graphql.Null in interface resolver when passed a typed nil
Go's dreaded typed nil strikes again. Nil pointers of struct types aren't equal to nil interface pointers.
-
c1e64148 Merge pull request #900 from zannen/master (closes #896)
-
531729df Move test schema file from example dir into codegen/testserver (#896)
-
3b5df4ce Add check for obviously different TypeReferences (#896)
-
2a269dd3 Add modelgen hook recipe
-
6ceb76b6 Test tag generation only by looking up extected tag strings
1f272d1b Add possibility to hook into modelgen plugin (closes #876)
This change introduces option to implement custom hook for model generation plugin without the need to completly copy the whole
modelgen
plugin.that can be:
func mutateHook(b *ModelBuild) *ModelBuild { for _, model := range b.Models { for _, field := range model.Fields { field.Tag += ` orm_binding:"` + model.Name + `.` + field.Name + `"` } } return b } ... func main() { p := modelgen.Plugin { MutateHook: mutateHook, } ... }
-
70e860cc Bind to embedded interface method
-
a745dc78 Fixes #843: Bind to embedded struct method or field
- 7508f4e5 Update to gqlparser-1.2.0
-
935f11ed Fix typo in title
-
026d029c 3->4 scalars
-
5eb6bef6 Fix weird indending
-
756dcf6b Merge pull request #907 from lian-yue/patch-1 (closes #860)
-
13c3d922 Update id function
-
37191779 Add more tests
-
0968e0cb Fix VSCode Weirdness, validate formatting
-
a20c96d5 More edits
-
e9e88b41 Stop double indending
-
9f4df68e More minor doc fixes
-
7abf0ac3 Fix documentation bug
-
e9730ab9 gofmt
-
c3930f57 Remove redundant paren, add test
-
395fc85e Add support for int64 ids
-
fc4e513f add test for vektah/gqlparser#109
-
dd98bb13 fix init not use custom schema
- 25b70271 Gracefully handle invalid types from invalid go packages
- 12c963a4 Use autobinding in testserver
b4867b3f Fixed broken GitHub link within the APQ page
Small documentation change to fix a broken GitHub link.
- 9f6b0ee4 v0.10.1 postrelease bump
v0.10.1 - 2019-09-25
- efb6efe0 release v0.10.1
v0.10.0 - 2019-09-24
- 75a83752 release v0.10.0
- 34d10975 Fix directives returning nils from optional interfaces
-
ed2a8536 Allow prefixes when using autobind
-
819cc71b Call middleware and directives for subscriptions
-
5a7c5903 Allow changing context in websocket init func
ed14cf04 Update playground.go
fix formatting
ee8d7a17 Update playground.go
fix formatting
-
27389951 fixes shareable link button in playground
-
4162d11e Refactor test client
-
8ed6ffc7 Fix for nested fields backed by map or interface
-
55b21442 Update stale.yml
-
feebee7d stalebot
- f33e09e8 Merge branch 'master' into fix-directive-nil
-
1f7ed0d5 refactor unimplemented directive handling
-
94ad3f2e fix directives return nil handling
-
5c644a6f v0.9.3 postrelease bump
-
82758be8 fix error
-
edde2d03 add OperationName field to RequestContext
-
830e466e introduce RequestContext#Validate and use it instead of NewRequestContext function
v0.9.3 - 2019-08-16
- a7bc468c release v0.9.3
-
ca4cc732 Fixed scalar documents
-
cc9fe145 fix go syntax issue when field has 2 directives
-
6b70be03 v0.9.2 postrelease bump
v0.9.2 - 2019-08-08
- 4eeacc6e release v0.9.2
- 5fafe79c Fix config loading during gqlgen init
- 297e09c4 change origin check
-
504a96bc set enabled linters
-
91966ef4 add example to lint
-
bcddd7aa fix typo in readme
-
cce06f1d update lint in circleci
- ab228f1b Update cors.md to allow CORS for websockets
c4ac9347 Fix doc
map[string]{interface} -> map[string]interface{}
-
fbbed5b8 use alias when invalid pkg name
-
2591ea36 fix lint prealloc
-
3b0e44fe fix lint misspell
-
6ff62b61 fix lint gocritic
-
cb7f482b fix lint unparam
-
620552be fix lint goimports
-
477e804e update config golangci
-
5b203bcc clarify where the go:generate line should be added
-
2a3df24e Replace the -v flag as described below.
-
f3eeb639 Clarify that the schema file will be generated
-
3ac17960 Missing '*' in Todos resolver example
-
bd598c2c Format import order using goimports
-
446c3df3 fixed generating a description to golang comments for enum type
-
4d1484b0 Fix doc for how to use @goField directives forceResolver option
-
6f3d7310 Fix pointer returns from directive
-
21b65112 v0.9.1 postrelease bump
v0.9.1 - 2019-06-27
- b128a291 release v0.9.1
1bbc0cd6 Update release process to keep tags on master
this was affecting the version shown in go modules when using commits
- ef3830b5 fix field schema directives applied to roots
- b716bfac Autobind models
- 0fc822ca CircleCI workflows
d0db28ab Update dataloaders.md
Make SQL request use requested IDs
-
a58ecfe9 add example and test field directive
-
526beecb update generate field
-
6e9d7dab generate types directive by location
-
dfec7b68 define fieldDefinition template
-
be890ab9 use UnmarshalFunc in args directives implement
-
dd162f04 define implDirectives template
- a4480fb0 fix globbing on windows
- f28ed264 Add coveralls
- dbd2cc6e simplify resolver test
- 69d7e282 move directive to directives.gotpl
-
c397be0c Update websocketInitFunc to return error instead of boolean
-
be18ae1f Add a test
-
a6508b6d Update typing, function name and small code refactor
-
e6d791a9 Add websocketOnConnectFunc as a config that can be used to validate websocket init requests
c5acbead resolvergen: use the resolver type as base name for dependent types
The template was outputing invalid code since the resolver type was not used in places like the embedding at {query,mutation}Resolver.
This change also ensures that objects like {query,mutation}Resolver also use the user provided type name as suffix.
Here's the resulting diff on the code generation with
type: GeneratedResolver
in the resolver config:diff -u resolver.go resolvernew.go --- resolver.go 2019-05-26 20:04:15.361969755 -0300 +++ resolvernew.go 2019-05-26 20:04:54.170737786 -0300 @@ -7,20 +7,20 @@ type GeneratedResolver struct{} func (r *GeneratedResolver) Mutation() MutationResolver { - return &mutationResolver{r} + return &mutationGeneratedResolver{r} } func (r *GeneratedResolver) Query() QueryResolver { - return &queryResolver{r} + return &queryGeneratedResolver{r} } -type mutationResolver struct{ *Resolver } +type mutationGeneratedResolver struct{ *GeneratedResolver } -func (r *mutationResolver) CreateTodo(ctx context.Context, input NewTodo) (*Todo, error) { +func (r *mutationGeneratedResolver) CreateTodo(ctx context.Context, input NewTodo) (*Todo, error) { panic("not implemented") } -type queryResolver struct{ *Resolver } +type queryGeneratedResolver struct{ *GeneratedResolver } -func (r *queryResolver) Todos(ctx context.Context) ([]*Todo, error) { +func (r *queryGeneratedResolver) Todos(ctx context.Context) ([]*Todo, error) { panic("not implemented") }
-
cfdbc39a update QueryDirectives
-
f32571ee add SUBSCRIPTION Directive
-
32462d0f update example todo add directive with location QUERY and MUTATION
-
3eec887a add Execute QUERY/MUTATION/SUBSCRIPTION Directives
-
8fcc1868 format
e0e1e318 Merge pull request [#1](99designs#1) from radev/master
Support for external APQ cache
-
9873d998 Add APQ documentation with example
-
48292c10 Support pluggable APQ cache implementations.
-
694f90aa Merge pull request #717 from cbelsole/schema_file_globbing (closes #631)
-
9be5aad0 Don't inject builtins during schema config
-
8dc17b47 support GET for apq
-
d36932c5 support automatic persisted query
-
de75743c Add plugin for providing config via schema directives
-
17a82c37 Provide config to skip generating runtime for a directive
-
9c1f8f2a added a missing close bracket
-
3dd8baf5 resolve all pkg dependencies
-
1617ff28 Merge pull request #718 from hh/fix-docs (closes #714)
-
9d332a7d Fixing getting-started documentation
-
39db1477 updated docs
-
e32c82be cleanup
- 3a21b369 Add faq section
v0.9.0 - 2019-05-15
- ea4652d2 release v0.9.0
-
71cc8554 make gqlgen generate 10x faster in projects with cgo
-
cab4babe Test mapping object types onto go primitives
-
962470de Fix a data race when handling concurrent resolver errors
- 4f5e9cf0 always use pointers when refering to structs in generated models
- 80ebe644 Fix typo
-
78f277e9 run go generate
-
d4b3de3a Merge remote-tracking branch 'origin/master' into enforce-request-content-type
-
aeccbce0 Update test include an example that uses io.Read interface directly
-
d9dca642 Improve documentation
-
f30f1c31 Fix fmt
-
54226cdb Add bytesReader to reuse read byte array
02e9dd8e Fix complexity case selection
Use the GraphQL field name rather than the Go field name in the generated
Complexity
func.Before this patch, overloading complexity funcs was ineffective because they were never executed.
It also ensures that overlapping fields are now generated; mapping all possible field names to the associated complexity func.
- bf2d07a4 moves naming convention to a non-go standard
-
f7d0b9c8 Enforce content type for POST requests
-
7d0b8eec Fix: omit deprecated fields when includeDeprecated=false
-
89c87345 fix grammar in docs
-
85643f5d fix import
-
ca96a155 update docs
-
1de25d0c adds interface scalar type
-
43fc53f9 Improve variable name
-
b961d34e Remove wrapper that is now not required
-
bb023476 Lint code
-
f8484159 Modify graphql.Upload to use io.ReadCloser. Change the way upload files are managed.
0306783e Revert "Change graphql.Upload File field to FileData."
This reverts commit 7ade7c2
-
7ba1b3b2 graphql.CollectFields now accept *RequestContext as first arg It was done because RequestContext is a part of executionContext and can be passed directly without extraction from ctx. This is increasing performance when model depth is high
-
5dfa2285 Pre-allocate mem for collectFields() method result slice
-
88cdbdf1 Rename getOrCreateField to getOrCreateAndAppendField to describe behaviour
-
a74abc47 Early return in shouldIncludeNode if directives empty
-
7ade7c21 Change graphql.Upload File field to FileData.
-
da52e810 Extend test and don't close form file.
- 0b39c445 Fix unset key and comment block
-
40c7b952 update test name
-
5418a290 Add recipe to use gin.Context
-
16f392ee add unit test
-
a0ee7172 codegen/templates: allow templates to be passed in options instead of os files
-
2cf7f452 Fix comments (add request size limit, remove useless comments, improve decoding and function signature, improve documentation)
b42e1ba6 update README.md
fix link
-
d3770395 Fix tests.
-
2c1f8573 Fix lint errors.
-
73b3a536 Fmt graphql.go
-
83cde4b6 Fix tests. Improve code format.
-
425849a6 Improve fileupload example readme. Update scalars.md. Add file-upload.md
-
849d4b1e Make uploadMaxMemory configurable
-
fc318364 Improve format, inline const.
-
662dc337 Move Upload to injected if defined in the schema as scalars
-
f244442e Fix merge. Remove regexp check.
bf79bc92 Merge branch 'master' into next
-
bd4aeaa6 Merge remote-tracking branch 'upstream/master'
-
3a6f2fb7 Improve test code
-
239bc46f Add comments
-
be8d6d12 Improve test
-
4d92696b Clean up code and add tests
-
2c414edc Improve and add tests
-
68446e17 Revert change to websocket_test
-
61c1cb9c Improve examples
-
493d9375 Improve examples
-
3c5f8bb9 Improve some examples
-
db7a03b1 Improve tests and names
-
c493d1b9 Revert changing to websocket_test
-
998f7674 Revert changing the stub file
-
a7e95c59 Fix tests. Improve file generation
-
10beedb3 Remove not required file
-
5afb6b40 Add file upload to default schema
-
9c17ce33 Add file upload
-
b454621d Add support to upload files.
v0.8.3 - 2019-04-03
- 010a79b6 release v0.8.3
- 93e72b58 doc: fix error on introspection doc page
-
e5ff6bc2 add extra builtins types when no type exists
-
8225f63a Allow plugins to provide additional template funcs
-
7b533df1 Update ISSUE_TEMPLATE.md
-
055157f9 Update ISSUE_TEMPLATE.md
52624e53 Fix Gin installation instruction
Current
go get gin
instruction results in an error from Go:package gin: unrecognized import path "gin" (import path does not begin with hostname)
- 515f2254 Add test case for custom scalar to slice
2284a3eb Improve IsSlice logic to check GQL def
Currently TypeReference.IsSlice only looks at the Go type to decide. This should also take into account the GraphQL type as well, to cover cases such as a scalar mapping to []byte
v0.8.2 - 2019-03-18
- ee06517c release v0.8.2
-
d10e048e Add docs for built-in scalar implementations
-
d27e6eb6 Add example case for object type overriding builtin scalar
-
d567d5c8 Inject non-spec builtin values only if defined
- a2cce0d1 Use graphql.String for types wrapping a basic string
- f02dabb7 Add test case for union pointer
8257d423 Check Go type rather than GQL type for ptr
This is probably a more correct way to check whether we should wrap the type in a pointer or not, rather than looking at the GrapQL definition. There may be use-cases where a GraphQL interface/union might be mapped to a Go stuct.
8e1590d7 Move ambient imports into cmd package
The getting started docs for dep suggest creating a local gqlgen script, however these ambient import are in the root, so dep misses them.
This was changed in 0.8 but the ambient imports weren't moved.
- c889b314 Handle colliding fields in complexity root gracefully
- 12cf01aa Allow user to supply path to gqlerror
- a48c55b2 Support returning nulls from slices
-
af6dc16d Add test for IsMethod in resolver
-
27e97535 Expose IsMethod to resolver context
-
f52726de Update README.md
- 6aa9dfc6 Adding entry for workshop
08f936e1 Upgrade graphql-playground to 1.7.20
CSS didn't change but js did.
-
37983a5f remove some invalid test schema
-
765ff738 Add some docs on maps
-
0a92ca46 Support map[string]interface{} in return types
-
a89050aa Bump gqlparser to 1.1.2
-
dd288145 Allow configuring the complexity limit dynamically per request
- 386eede9 Add Gin recipe
-
bef6c0a9 Fix directives on args with custom type
-
bc386d79 Fix mixed case name handling in ToGo, ToGoPrivate
v0.8.1 - 2019-03-07
- 229185e4 release v0.8.1
- de3b7cb8 Fix autocasing modelgen bugs
- b27139ed Fix default scalar implementation regression
-
52838cca fix ci
-
2c3783f1 some refactoring
-
eb453674 address comment
-
dcd208d9 Merge pull request #584 from 99designs/fix-deprecated-directive
5ba8c8ea Add builtin flag for build directives
These have an internal implementation and should be excluded from the DirectiveRoot. In the future this may be a func that plugins could use to add custom implementations.
b8526698 Load the playground sources from HTTPS by default
For some browsers on non-secure domains resources from CDN doesn't loads, so I made all cdn.jsdelivr.net resources of the playground by HTTPS by default
- 6ea48ff6 Take care about commonInitialisms in ToCamel
44becbbe Update README.md
Fixed typo in MD link ttps -> https
v0.8.0 - 2019-03-04
- f24e79d0 release v0.8.0
- 8f91cf56 Very rough first pass at plugin docs
- 08923334 Handle non-existant directories when generating default package names
- fb87dc39 Automatically bind to int32 and int64
-
1e7aab63 Workaround for using packages with vendored code
-
5c692e29 User README as canonical introduction
-
25bdf3d6 Consolidate Introduction documents
-
d81670d8 Add initial contributing guidelines
-
d9a9a532 playground: secure CDN resources with Subresource Integrity
-
6ad1d97e Move feature comparison
-
37cbbd6d playground: secure CDN resources with Subresource Integrity
-
da12fd11 Fix cli config getters
- 67795c95 Recover from panics in unlikly places
-
0bd120b5 Update dep code as well
-
6c576032 Update getting started with 0.8 generated code
-
ba761dcf Reintroduce main package in root
-
cdc575a2 Update getting started with Go Modules support
-
378510e5 Move Getting Started above Configuration
-
d261b3fb Fix navigation font weights
-
58b2c74f drive by config fix
-
f6c52666 Add a test for aliasing different cases (closes #376)
-
0eb8b5c1 Merge remote-tracking branch 'origin/master' into HEAD
-
3a8bf33f Add CollectAllFields test cases
-
9ebe7717 Fix unstable external marshaler funcs with same name as type
-
dc925c46 Added a test for config checking
-
b56cb659 Refactored config check so that it runs after being normalized
-
dc6a7a36 Add CollectAllFields helper method
a2e61b3d Added a model and used directive on an input field within the integration schema
Added to the integration schema such that the build will catch the directive bug in question.
-
0b0e4a91 Fix directives on fields with custom scalars
-
8ac0f6e4 Removed redundant semicolons
-
3645cd3e Add more validation checks on .yml config file
1b8b1ea1 Fix typo in README
Fix typo in README in selection example directory to point to the selection example, not the todo example.
- fcacf200 Merge remote-tracking branch 'origin/master' into HEAD
- 99e9f41f Use Implements for type Implementors in codegen
ccca823f Separate out conditionals in collect fields
These conditions are not really related, and I missed the second conditional when reading through the first time.
-
efe8b026 Add reproducable test cases
-
306da15f Automatically convert IsZero to null
-
f81c61d3 Merge pull request #539 from 99designs/test-nullable-interface-pointers (closes #484)
-
787b38d8 Break testserver tests down into smaller files using stubs
-
c5e3dd44 add stub generation plugin
- b26b915e Move input validation into gqlparser see vektah/gqlparser#96
7d394222 Fix typo in README
Fix typo in README in selection example directory to point to the selection example, not the todo example.
-
42131868 Linting fixes
-
956d0306 Arg type binding
-
6af3d85d Allow multiple field bind types
-
3015624b Regen dataloader with correct version
-
50f7d9c8 Add input field directives back in
-
8047b82a Fix nullability checks in new marshalling
-
b3f139c9 Cleanup field/method bind code
-
cf94d3ba Removed named types
82ded321 Merge pull request #532 from 99designs/fix-missing-json-content-type
Fix set header to JSON earlier in GraphQL response
Update the GraphQL handler to set the Response Header to JSON earlier for error messages to be returned as JSON and not text/html.
Fixes 99designs#519
- Add checks for JSON Content-Type checks in decode bad queries tests
b4c5a074 Fix set header to JSON earlier in GraphQL response
Update the GraphQL handler to set the Response Header to JSON earlier for error messages to be returned as JSON and not text/html.
Fixes 99designs#519
== Notes:
- Add checks for JSON Content-Type checks in decode bad queries tests
-
555d7468 Remove TypeDefinition from interface building
-
cfa012de Enable websocket connection keepalive by default
c5b9b5a8 Use constant tick rate for websocket keepalive
Some clients (e.g. apollographql/subscriptions-transport-ws) expect a constant tick rate for the keepalive, not just a keepalive after x duration of inactivity.
5e1bcfaf Remove parent check in directive
This should always be true, and currently has a bug when comparing pointers to structs. Can just be removed.
-
c1b50cec Stop GetResolverContext from panicking when missing
-
44aabbd3 Move all build steps back into file containing defs
-
4e49d489 Merge object build and bind
-
97764aec move generated gotpl to top
-
d380eccf promote args partial to full template
-
1bc51010 Everything is a plugin
d3f1195c add `content-type: text/html` header to playground handler
This ensures that the browser doesn't think it should download the page instead of rendering it, if the handler goes through a gzipping middleware.
-
21769d93 Ensure no side affect from preceding tests in wont_leak_goroutines test
-
10f4ccde newRequestContext: remove redundant else part
-
a76e0228 Add cache usage for websocket connection
-
940db1f9 Fix cacheSize usage in handler
-
a7f719a3 update appveyour to not rely on main
-
f46b7c8e Reclaim main package for public interface to code generator
-
6b829037 Extract builder object
-
87b37b0c Replace string based type comparisons with recursive types.Type check
-
1d86f988 extract argument construction
-
4b85d1b0 Merge buildInput into buildObject
-
db33d7b7 Extract graphql go merge into its own package
-
afc773b1 Use ast definition directly, instead of copying
-
8298acb0 bind to types.Types in field / arg references too
-
38add2c2 Remove definition embedding, use normal field instead
-
950ff42c Bind to types.Type directly to remove TypeImplementation
-
70c852eb Add lookup by go type to import collection
-
eb101161 Remove aliased types, to be replaced by allowing multiple backing types
-
4138a372 rename generator receiver
-
bec38c7e Extract config into its own package
-
34b87871 Rename core types to have clearer meanings
-
f10fc649 Merge remote-tracking branch 'origin/next' into HEAD
-
1140dd85 add unit test for list of enums
-
1e3e5e9b add list of enums
-
f87ea6e8 Merge remote-tracking branch 'origin/master' into HEAD
- f9ee6ce0 return arg in middleware
5c8b1e24 Avoid unnessicary goroutines
goos: linux goarch: amd64 pkg: github.com/99designs/gqlgen/example/starwars BenchmarkSimpleQueryNoArgs-8 300000 25093 ns/op 6453 B/op 114 allocs/op PASS ok github.com/99designs/gqlgen/example/starwars 10.807s
b0ffa22a Remove strconv.Quote call in hot path to avoid some allocs
go test -benchtime=5s -bench=. -benchmem goos: linux goarch: amd64 pkg: github.com/99designs/gqlgen/example/starwars BenchmarkSimpleQueryNoArgs-8 200000 32125 ns/op 6277 B/op 118 allocs/op PASS ok github.com/99designs/gqlgen/example/starwars 9.768s
2cf5a5b8 Add a benchmark
go test -benchtime=5s -bench=. -benchmem goos: linux goarch: amd64 pkg: github.com/99designs/gqlgen/example/starwars BenchmarkSimpleQueryNoArgs-8 200000 32680 ns/op 6357 B/op 126 allocs/op PASS ok github.com/99designs/gqlgen/example/starwars 9.901s
-
5e0456fe fix fmt anf metalint generated code
-
b32ebe14 check nullable value for go1.10
-
d586bb61 use arg value for the ResolveArgs
-
e201bcb5 set default nil arg to ResolverContext
-
6fa63640 remove empty line in generated files
-
139ed9fb fix go10 assign exist variable by eq
-
428c6300 add nullable argument to directives
-
74096033 move chainFieldMiddleware to generate code for BC
-
be51904c check nullable arguments
-
6b005094 add test directives generate
-
047f2ebc update inline template
-
a13b31e9 metalinter
-
526bef0b generate servers and add path to error
-
29770d64 resolve = in template
-
3a729cc3 update recursive middleware
-
8b3e634e update tempate and set Dump public
-
e268bb75 Merge remote-tracking branch 'upstream/master' into directives
-
e8f0578d add execute ARGUMENT_DEFINITION and INPUT_FIELD_DEFINITION directive
v0.7.2 - 2019-02-05
- da1e07f5 release v0.7.2
- 43fdb7da Suppress staticcheck lint check on circleci
9c4b877a Use constant tick rate for websocket keepalive
Some clients (e.g. apollographql/subscriptions-transport-ws) expect a constant tick rate for the keepalive, not just a keepalive after x duration of inactivity.
- d36d3dc5 Add websocket keepalive support
9f6f2bb8 Update config.md
Add a missed word and add an apostrophe
-
c033f5fc Fix edit link positioning
-
b3f163d8 Add not about relative generate path
-
675ba773 Update errors.md
9bcd27c1 Update getting-started.md
modify
graph/graph.go
toresolver.go
v0.7.1 - 2018-11-29
v0.7.0 - 2018-11-28
- a81fe503 release v0.7.0
- 747c3f9c Update gqlparser to latest
-
b9fbb642 Mention recursive-ness of generate ./...
-
e236d8f3 Remove generate command from resolver.go
-
04a72430 Re-add final touches section to getting started
-
3a7a5062 Add handler import to root cmd
-
9dba96d5 Fix GraphQL capitalisation
-
1dfaf637 Minor updates to getting started from feedback
-
94b95d97 Some CSS fixes
-
a36fffd2 Updated getting started with new no-binary approach
-
601354b3 Add blockquote breakout style
6bea1d88 Merge remote-tracking branch 'origin/master' into disable-introspection
Regenerate
- 62f0d085 Edit copy for introspection docs
da31e8ed Update directives.md
Fix small typo
-
83e33c13 Remove a debug print
-
6c575914 fix doc indentation
-
f03b32d3 Use new import handling code
-
c45546e5 Increase float precision
-
77f2e284 Start moving import management to templates
-
c114346d Decouple loader creation from schema
- 8a5039d8 Fix flakey goroutine test
- 293b9eaf Remove graphqlgen link
-
ae1c7732 fix generate stubs sentence
-
827dac5e Fix type binding validation for slices of pointers like []*foo
- a816208b Update README.md comparison with graph-gophers
- d4f7c954 Update context.go
4c4ccf47 Update context.go
Right now code generated with latest master fails since there are usages of Trace but there is no any single write to this variable
-
5faf3a2b re-generate
-
6fed8947 rebase fixes
-
4c10ba55 fix generated code
-
8066edb7 add tests
-
9862c30f mention contexts on model methods in docs
-
602a83d6 make ctx method resolvers concurrent
-
49755120 accept an optional ctx parameter on model methods
- cac61bb2 Fix docs typo
9875e74b Switch to hosting docs on render.com
Render.com has offered to host our static site for free, and have a pretty simple setup for rebuilding on merge to master. I've switched the DNS records and updated the docs.
-
027803d2 address comment
-
2b090de9 address comment
-
d3238d54 chore
-
a2c33f13 write ctx behavior test & refactoring tracer test
-
5c28d011 fix unexpected ctx variable capture on Tracing
- a4eaa400 add tests for RequestContext#GetErrors
-
7286e244 fix shadowing
-
af38cc5a Bump to the latest version of graphql-playground
-
8bbb5eb7 fix some tests
-
256e741f add complexityLimit and operationComplexity to StartOperationExecution
-
4e7e6a1c Merge branch 'master' into feat-opencensus
-
2d3026cb Merge branch 'master' into feat-complexity
-
59ef91ad merge master
-
c9368904 Merge branch 'master' into feat-opencensus
-
fd4f5587 fix timing issue
-
91e3e88d address comment
-
a905efa8 fix lint warning
-
b2ba5f86 address comment
-
561be1c0 add Apollo Tracing sample implementation
-
83c7b2cb add Start/EndOperationParsing & Start/EndOperationValidation methods to Tracer
-
b5305d75 address comment
-
784dc01f oops...
-
a027ac21 copy complexity to RequestContext
-
ececa23c add Tracer for OpenCensus
195f952b fix CI failed
AppVeyor handle this test, But Circle CI is not
-
b5b767c4 address comment
-
d723844b add Type System Extension syntax example
-
df685ef7 change timing of EndFieldExecution calling
-
94b7ab02 refactor Tracer interface signature that fit to apollo-tracing specs
8eb2675a Revert "change field marshaler return process that make it easy to insert other processing"
This reverts commit 583f98047f5d1b6604d87e7b8d6f8fd38082d459.
-
c8af48cd rename Tracer method name
-
a3060e80 refactor Tracer signature
-
d319afe6 add support request level tracer
-
1c5aedde add support field level tracer
-
583f9804 change field marshaler return process that make it easy to insert other processing
-
ab4752c2 Update README.md
- a230eb04 Support multiple schemas
- f1f043b9 reverse 'data' and 'error' fields order in failure tests
v0.6.0 - 2018-10-03
- 6f486bde release v0.6.0
- 732be395 Don't let goimports guess import paths
- bab70df5 Add a stress test on query cache
- 23b58f6d fix error docs
- 77257d1e Revert "Revert "Generate typed interfaces for gql interfaces & unions""
- 02658647 Revert "Generate typed interfaces for gql interfaces & unions"
f5c03401 Do not strip ptr for args with defaults
This fails if a client still sends a null value. If an arg is nullable but has a default, then null is still a valid value to send through.
- 0c399270 Add test case
-
d3e27553 Bump gqlparser to latest master
-
b8af0c81 Use types.Implements to check if an interface implementor accepts value recievers
-
faf0416b Parent resolver generated contexts
-
caa474c6 Check for embedded pointer when finding field on struct
-
f302b408 Added reproduce test case
-
3147d914 Updated example in docs to use handler.GetInitPayload instead of graphql.GetInitPayload
-
32f0b843 Moved InitPayload from graphql to handler package, updated test to import it from there.
-
01923de6 Moved initPayload to wsConnection member, changed wsConnection.init to return false on invalid payload
-
25268ef9 Added information about it under recipes/authentication doc
-
575f28e0 Fixed graphql.GetInitPayload panic if payload is nil.
380828fa Added parsing of the websocket init message payload, and making it available via the context passed to resolvers.
- Added GetInitPayload(ctx) function to graphql
- Added WithInitPayload(ctx) function to graphql
- Added WebsocketWithPayload method to client.Client (Websocket calls it with a nil payload for backwards compability)
- Added tests for these changes in codegen/testserver/generated_test
-
8fdf4fbb Add test case for extension response
-
60196b87 Add extensions to response struct
-
cbde0ea9 Generate typed interfaces for gql interfaces & unions
v0.5.1 - 2018-09-13
- baa99fc5 cleaned up resolver doc
729e09c8 README.md: Updates `graphql-go/graphql` features.
- Subscription support: graphql-go/graphql#49 (comment)
- Concurrency support: graphql-go/graphql#389
- Dataloading support: graphql-go/graphql#388
-
229a81be Fix gouroutine leak when using subscriptions
-
c15a70ff Adds docs for how resolvers are bound
-
35c15c94 Add link to talk by Christopher Biscardi
-
31505ff4 Use arg function for generated Complexity method
-
ebdbeba0 Just realized "if not" is allow in templates
-
861a805c Regenerate code
639727b6 Refactor arg codegen
Now a function is generated for each field and directive that has arguments. This function can be used by both field methods as well as the
Complexity
method.The
args.gotpl
template now generates the code for this function, so its purpose is a little different than it used to be.
- c770b4e7 Use built-in less than operator instead of strings.Compare
v0.5.0 - 2018-08-31
- 5bc4665f release v0.5.0
- 14587a5f Add version const
-
2ab857ee Merge branch 'master' into query-complexity
-
6e408d5d Interfaces take max complexity of implementors
-
239b1d22 Don't emit complexity fields for reserved objects
-
8da5d61b Generate complexity for all fields. Fix bugs. Re-generate examples.
-
e5265ac2 Fix complexity template bug
-
7c040045 now with field values
-
08ab33be starting to look better
-
e834f6b9 Query complexity docs
-
a0158a4e Drop old cli flags
-
bb78d2fa go generate ./..
-
2488e1b3 Merge branch 'master' of https://github.com/99designs/gqlgen
-
d63449b9 Remove support for the old json typemap
-
fce4c722 address comment
-
8c3aed7d Merge branch 'master' into query-complexity
cecd84c6 Add complexity package tests
Also some small behavior fixes to complexity calculations.
- fcd700b6 Panic on lru cache creation error
78c57079 Add query cache
This commit adds a query cache with a configurable maximum size. Past this size, queries are evicted from the cache on an LRU basis.
The default cache size is 1000, chosen fairly arbitrarily. If the size is configured with a non-positive value, then the cache is disabled.
Also ran
dep ensure
to add the new dependency toGopkg.lock
.
-
076f9eac removed dirt
-
6ae82383 trying to get description with generated models
-
7d6f8ed4 fixes case where embeded structs would cause no field to be found
-
02873495 use goroutine about processing each array elements
-
40f904a6 Merge branch 'master' of github.com:99designs/gqlgen into tags
-
56768d6b adds tests for findField
-
556b93ac Run go generate ./...
-
0e2aaa9e Merge branch 'master' of github.com:99designs/gqlgen into tags
-
7cfd9772 fixes field selection priority
-
238a7e2f Add complexity support to codegen, handler
-
95ed529b New complexity package
-
1fda3ede Add obj to Directives
-
9ec385d1 Merge branch 'tags' of github.com:codyleyhan/gqlgen into tags
-
c5849929 adds binding by passed tag
-
6ef2035b refactor set Result timing
-
568a72e9 add some refactor
- b07736ef Validate gopath when running gqlgen
b082227d fix mapstructure unit test error
fix unit test error "mapstructure: result must be a pointer". It appears instead of resolver returned error.
- 25b12cb6 Remove 404s from sitemap
-
64f3518e run generate
-
a81147df Add a PR template
-
15d8d4ad Merge branch 'introspection-directive-args' into HEAD
-
12efa2d5 add tests
-
95b6f323 finds fields by json struct tag
-
07ee49f3 Added args to introspection scheme directives.
-
e57464fe refactor ResolverContext#indicies and suppress lint error
-
09e4bf8c add Result field instead of ParentObject field
-
fabc6f8f Merge branch 'master' into feat-directive-parent
-
e53d224e Merge branch 'master' into feat-directive-parent
-
c8552729 Put newline at end of gqlgen init output
-
072363c7 add ParentObject field to ResolverContext
- 7926c688 Simplfy concurrent resolver logic
v0.4.4 - 2018-08-21
- 6f6622c6 Bump gqlparser to latest version
- cac3c729 Explicitly import ambient imports so dep doesn't prune them
- fd09cd99 sort directives by name when gen
- 05c73d9f Fix broken links in docs
- 31478cf4 Stop force resolver from picking up types from matching fields
- 36e84073 Speed up tests
0.4.3 - 2018-08-10
- b808253f Fix missing default args on types
- e9c68f08 make appveyor less flakey
0.4.2 - 2018-08-10
- 06b00d45 Update README.md
-
7f20bdef disable tty for jest
-
bb0a89a0 exclude generated code from tests
-
c2bcff79 regenerate
-
45e22cb1 Add introspection schema check
-
ae82b94a convert existing tests to jest
-
f04820b1 address comment
-
88730e2c Convert test directory into integration test server
-
f372b1c9 Use docker in docker for the existing testsuite
-
47a7ac35 Prevent executing queries on variable validation failures
-
e6e323d0 stop pickup "github.com/vektah/gqlgen/handler" from GOPATH
-
e6005f6b fix mobile nav
-
1871c4ce Add bold variant of Roboto to docs
-
fc9fba09 Some minor edits to authentication docs
-
d151ec8d Add docs on user authentication
-
8db3c143 Add structure to menu
- 2acbc245 Make keyword decollision more lint friendly
-
6d39f868 Add logo to doc site
-
d7241728 Better error on init if file exists
-
fb03bad9 Run init even if config is found
-
52b78793 Fix hard-coded server filename in init
0.4.1 - 2018-08-04
- 7400221c Fix introspection api
0.4.0 - 2018-08-03
- 4361401a Rewrite import paths
- 658a24d9 Move doc site
- 95fe07fe use json.Decoder.UseNumber() when unmarshalling vars
-
ef208c76 add docs for resolver generation
-
e44d798d Add directives docs
-
62d4c8aa Ignore __ fields in instrospection
-
bc204c64 Update getting started guide
-
b38c580a Return the correct mutation & subscription type
-
9397920c Add field name config docs
-
d2265f3d Add implicit value to array coercion
-
19b58175 Merge remote-tracking branch 'origin/master' into HEAD
-
c3fa1a55 Merge branch 'next' into feat-lintfree
- 64ef0571 Use fonts from golang styleguide
-
4fb721ae address comment
-
bf43ab3d Merge branch 'next' into feat-fieldmapping
-
353319ca Refactor GoVarName and GoMethodName to GoFieldName etc...
-
d7e24664 Add method support
-
d6a76254 Add missing variable validation
-
121e8db4 Generate server on running init
-
108bb6b4 Rename govarname to modelField
-
f7f6f916 Make more lint friendly
-
69eab938 Add model field mapping
078bc985 Fixing init command
The init command always return file already exists if there are no configFilename specified
This is caused by codegen.LoadDefaultConfig() hiding the loading details and always return the default config with no error while the init command code expects it to tell us if config exists in default locations.
To avoid confusion I have splitted the loading config from default locations out into its own method so we can handle different cases better.
Additionally I also moved default config into a method so we always generating new a config instead of passing it around and potentially mutating the default config.
-
0ec918bf Switch GoName to Name|ucFirst
-
5dc104eb Add middleware example for Todo
-
73a8e3a3 Fix some issues with directive middlewares
-
84163247 Regenerate
0e16f1fc Generate FieldMiddleware
Moves it off of RequestContext and into generated land. This change has a basic implementation of how directive middlewares might work.
69e790c2 Add *Field to CollectedField
We need the Field Definition so that we can run directive middlewares for this field.
- d6813f6d Generarte
764c6fda Refactor ResolverMiddleware to FieldMiddleware
This will allow us to include DirectiveMiddleware in the same middleware setup, that will run after Resolver middlewares.
0dfb92a7 Update getting-started.md
CreateTodo UserID input should be UserId not User
7292be78 Rename CastType to AliasedType
This field stores a Ref if a type is a builtin that has been aliased. In most cases if this is set, we want to use this as the type signature instead of the named type resolved from the schema.
- ec928cad Regenerate examples
97f13184 Remove comment about ResolverMiddleware
Not true anymore!
- b512176c Run resolver middleware for all fields
- 40989b19 turn back -race option
1ba61fcb Update test & examples to use new resolver pattern
- chat
- dataloader
- scalar
- selection
- starwars
- todo
38708961 Stop generating two types of resolvers
In recent refactor we introduced a new pattern of resolvers which is better structured and more readable. To keep Gqlgen backward compatible we started generate two styles of resolvers side by side.
It is now time to sunset the old resolver. This commit removes the old resolver and update the generation code to use the new resolver directly.
a69071e3 Pass context to CollectFields instead of RequestContext
Internally it can still get to RequestContext as required.
-
d02d17ae Add method for generating method name from field
-
c7ff3208 Update gqlparser version to include default resolution
-
ce17cd90 Add default value test case
cbfae3d3 Add skip/include test cases
Adds a set of test cases for skip and include directives to the todo example. Also now conforms to spec if both are included.
ea0f821c Add skip/include directive implementation
This is a snowflake implementation for skip/include directives based on the graphql-js implementation. Skip takes precedence here.
- ebfde103 Pass request context through to CollectFields
-
138b4cea Bump gqlparser to get schema validation
-
08d7f7d0 Merge branch 'next' into feat-init
-
39f9dbf6 fix error from breaking change
-
41147f6f update Gopkg.lock
-
87d8fbea remove unused flag
-
eff49d04 support init subcommand
-
c5810170 introduce cobra library
-
c3c20f8f Merge remote-tracking branch 'origin/master' into HEAD
- f4d31aa4 Update gqlparser for validation locations
edb3ea4e Use original credential for query request in playg
Currently the playground doesn't forward any credentials when making query calls. This can cause problems if your playground requires credential logins.
- c41a6c36 Remove trailing Println
- c52f24af Update playground version to 1.6.2
0.3.0 - 2018-07-14
- 164acaed validate method return types
- a1c02e7b Strict config
- e0bf6afd Support nullable list elements
- bf1823cd Allow forcing resolvers on generated types
-
b884239a clarify error response ordering
-
58e32bbf Drop custom graphql error methods
-
d390f9c6 Errors redux
0.2.5 - 2018-07-13
-
ea4f26c6 more fixes
-
1066953d Appveyor config
-
f08d8b61 Fix windows gopath issue
-
9ade6b7a Update gettingstarted to use new resolvers
0.2.4 - 2018-07-10
- 160ebab5 Fix a bug custom scalar marshallers in external packages
-
936bc76e Better handling of generated package name
-
5d3c8ed2 Inline ImportPath strings
-
fc43a92a Check that exec and model filenames end in *.go
-
6d38f77d Handle package name mismatch with dirname
-
ebf1b2a5 Add error message when specifying path in package name
-
c8355f48 Check models config for package-only specs
0.2.3 - 2018-07-08
- 6391596d Add some basic docs on the new config file
- 25cfbf08 Search for config
- 61f37173 gometalinter should cover all packages
- aa4cec9b add .idea/ to .gitignore
0.2.2 - 2018-07-05
- f79b6a52 cleanup new config
-
fca1e08e shh errcheck
-
cc78971e Dont show compilation errors until after codegen
-
9f6ff0cf Convert todo example to new resolver syntax
-
8577ceab address comment
-
86dcce73 Add format check to -typemap argument
-
5debbc6a Implement types.yaml parsing
-
ecf56003 Refactor types.json parsing
- 88a84f83 Updated mutation to take correct argument
f66e2b3b Fix bug with multiple GOPATH full package name resolving
This commit fixes the bug where GOPATH values that are longer than the input package name cause 'slice bounds out of range' errors.
0.2.1 - 2018-06-26
-
769a97e2 fix race in chat example test - t.Parallel() doesn't guarantee parallel execution - moved goroutine so the test can execute independently
-
5b77e4c2 remove deprecation warning for now
-
59a5d752 remove trailing S
-
b04846f6 fix time race in scalar test
-
a80b720f name updates, deprecation, some code comments
-
2bbbe054 Merge branch 'master' into small-interfaces
-
4ffa2b24 case insensitive compare to determine self package
-
c0158f54 make sure colliding imports are stable
-
abf85a10 get package name from package source
-
a39c63a5 remove a random json tag from tutorial
-
f48cbf03 tutorial fixes
-
4a6827bd Update getting started guide
-
a21f3273 Use recognized
Code generated
header -
038c6fd2 change from
ShortResolver
toShortResolvers
- prevents possible collision with an object type namedShort
-
0bc592cd run go generate
-
db2cec07 fix template formatting
-
59ee1b5c from probably makes more sense
-
620f7fb4 add "short" resolver interface
0.2.0 - 2018-06-21
-
c1b4574c fix example links
-
63976d5f fix GOPATH case mismatch issue
-
8771065f skip fields with incompatible types
- 7db9d122 convert windows input path separators to slash
-
5680ee49 Adding dataloader test to confirm no panic on malformed array query
-
55cc161f Fixing panic when non array value is passed to array type
-
6b3b338d Add gitter link to readme
-
6c823beb add doc publish script
-
3a129c77 Fix typo in url dataloaden
-
e1fd79fe Merge pull request #111 from imiskolee/master (closes #110)
-
abb7502a 1. run go generate
-
e1f90946 1. add json tag in models_gen.go 2. use gqlname to model filed json tag.
63ee4199 Fix vendor normalization
When refering to vendored types in fields a type assertion would fail. This PR makes sure that both paths are normalized to not include the vendor directory.
- 1cd80c4a Default values for input unmarshalers
- 7b1c8198 Refactor tests
-
4bdc1e1f regenerate
-
20250f18 Add fully customizable resolver errors
-
a0f66c88 Update README.md
-
8f62d505 Update README.md
-
a1043da6 Add feature comparison table to readme
-
e7539f11 Add an error message when using types inside inputs
-
a780ce69 Add a better error message when passing a type into an input
-
0424f043 Refactor main so tests can execute the generator
d157ac35 Add context to recover func
This makes the request and resolver contexts available during panic so that you can log the incoming query, user info etc with your bug tracker
- 53a6e814 fix package paths on windows
-
f0def668 better opentracing tags
-
600bff7a bump metalinter deadline
-
2e32c121 regenerate code
-
5b908507 opentracing middleware
-
57adb244 Add resolver middleware
-
28d0c81f capture args in map
b0d79115 Replace invalid package characters with an underscore
This will sanatise local import names to a valid go identifier by replacing any non-word characters with an underscore.
- 9a532131 Allow generated models to go into their own package
- af38cf05 Support OPTIONS requests
- af6178a7 Use a raw string for schema
- 85a51268 Generate enums
-
c60336bf regenerate
-
c5ccfe4e Add an example for getting the selection sets from ctx
-
e7007746 add fields to resolver context
-
40918d52 move request scoped data into context
-
2ff9f32f Fix vendored import paths
-
630a3cfc failing test
-
99dec54c fix missing deps
-
652c567e Remove missing field warning and add test for scalar resolvers (closes #63)
-
3dc87e1b gtm
-
c76c3434 Add dataloader tutorial
-
449fe8f8 Optimize frontmatter
-
b90ae60e flatten menus
- d81ea2c2 Deal with import collisions better
- 49d92164 Add map[string]interface{} escape hatch
-
17fd17a4 Update the tutorial
-
e65d2a5a detect correct FK type
-
b66cfa03 small fixes to entry point
-
0b62315a Create ISSUE_TEMPLATE.md
- 10541f19 Fix ptr unpacking in input fields
15b3af2d Fix value receivers for unions too
fixes 42
- 302058a7 Use default entry points for Query/Mutation/Subscription
- acc45bf0 generate interfaces
- ffe972a8 Only bind to types in the root package scope
- bc9e0e54 Allow unset arguments
- e4e249ea Customizable recover func
- 9b64dd22 Fix complex input types
- cf580c24 Split model generation into its own stage
-
78c34cb3 regenerate
-
5ebd157c Only use one gofunc per subscription
-
79a70376 Move generated field resolvers into separate methods
- 98176297 Fix input array processing
- 278df9de Better templates
- 85fa63b9 Automatically add type conversions around wrapped types
-
d514b829 Add some go tests to the chat app
-
ec2916d9 chat example for subscriptions using CRA+apollo
-
8f93bf8d get arg errors working in both contexts
-
62a18ff1 Update generator to build a new ExecutableSchema interface
-
c082c3a4 prevent concurrent writes in subscriptions
-
f555aec6 switch to graphql playground for better subscription support
-
18219541 add websocket support to the handler
-
d4c7f3b9 update resolver definition to use channels for subscriptions
-
5d86eeb6 fix jsonw test
-
944ee088 regenerate
-
4722a855 add scalar example
-
83b001ae rename marshaler methods
-
e0b7c25f move collectFields out of generated code
-
146c6538 generate input object unpackers
-
d94cfb1f allow primitive scalars to be redefined
-
402e0730 rename jsonw to graphql
-
3e7d80df Update README.md
-
9c77e7a0 Update dataloaden dep
-
530f7895 Make gql client work with older versions of mapstructure
-
5c04d1ad __typename support
51292db9 Merge pull request [#4](99designs#4) from vektah/cleanup-type-binding
Cleanup schema binding code
- c89a8774 Cleanup schema binding code
030954a5 Merge pull request [#2](99designs#2) from ulrikstrid/patch-1
Fix typo in README
-
cb507bd0 Fix typo in README
-
e3167785 Fix template loading from inside vendor
-
261b52ce fix an error handling bug
-
1da57f59 Split starwars models out from resolvers
-
743b2cf9 fix indenting
-
fb2d5817 use gorunpkg to vendor go generate binaries
-
7f4d0405 encourage dep use
-
3276c782 Do not bind to unexported vars or methods
-
5fabffaf heading tweaks
-
e032c1d5 Prior art
-
45b79a1e Add a test for multidimensional arrays
-
ec73a50a fix race
-
75a3a05c Dont execute mutations concurrently
-
3900a41d tidy up json writing
-
0dcf7f6b add circle ci badge
-
2c9bf21c get dataloaden
-
4fff3241 install dataloaden in ci
-
951f41b2 circle ci
-
8fa5f628 less whitespace
-
c76f3b98 clean up template layout
-
4a6cea5e readme fixes
-
b814ad52 rename repo
-
9c79a37a Cleanup and add tests
-
5afb5caa update dataloaden
-
d00fae08 Add dataloader example
-
86cdf3a0 Fix package resolution
-
41306cba Better readme
-
ce5e38ed Add GET query param support to handler
-
dd9a8e4d parallel execution
-
4468127e pointer juggling
-
9e99c149 Use go templates to generate code
-
41f74970 Support go versions earlier than 1.9
-
c20ef3d0 add missing nulls
-
bb753776 Use goimports instead of gofmt on generated code
-
c2cf3835 coerce types between similar types
-
5297dd40 Add support for RFC3339 formatted Time as time.Time
-
61291ce9 support vendor
-
6d437d7e allow map[string]interface{} arg types
-
39a8090a cleanup
-
a9352e32 gometalinter pass
-
9ab81d67 Finish fleshing out the connection example
-
e04b1e50 inline supporting runtime funcs
-
9cedf012 complex arg handling
-
0c9c009f Clean up json writer
-
e7e18c40 much cleaner generated code
-
6a76bbf6 Interfaces and starwars example
-
29110e76 Generate ESS to remove it interface{} casts completly
-
2f358e7d graphiql autocomplete working
-
2e2c3135 create separate type objects in prep for fragment support
-
22c0ad0a Add basic introspection support
-
c1c2cb64 Code generation
-
4be5ac84 args
-
bde800e1 imports
-
596554da start of code generator
-
62fa8184 split generated vs exec code
-
0ea104cd remove internal package
-
f81371e8 Args
-
01896b3b Hand written codegen example
-
5a756bda Rewrite paths and add readme
b4663703 trace: Log graphql.variables rather than tag
According to the OT documentation tag values can be numeric types, strings, or bools. The behavior of other tag value types is undefined at the OpenTracing level. For example
github.com/lightstep/lightstep-tracer-go
generates error events.
- 5d3b13f2 Support context injection in testing
beff0841 Separate literal arg parsing cases (int, float)
This change allows the ID scalar implementation to more semantically handle the case for unmarshalling integer IDs.
ab1dd4b5 Add tests for ID scalar input
This commit adds two tests cases for ID scalar input:
- a string literal
- an integer literal
Both of these literal types are covered by the GraphQL specification as valid input for the ID scalar.
Reference the ID section of the spec for more information: http://facebook.github.io/graphql/October2016/#sec-ID
d8c57437 Extract ID scalar implmentation
This change moves the ID scalar implementation out of
graphql.go
and into its own fileid.go
for consistency with the Time scalar implementation.
- 10eb949b cleaned up example to use MustParseSchema
52080e1f Rename friendsConenctionArgs to friendsConnectionArgs
Fix spelling error in friendsConnectionArgs type
- 3965041f Update GraphiQL interface (add history)
6b9bc3e2 Add `(*Schema).Validate` (#99)
- Add
(*Schema).Validate
This adds a
Validate
method to the schema, which allows you to find out if a query is valid without actually running it. This is valuable when you have a client with static queries and want to statically determine whether they are valid.- Fix Validate doc string
- Add
-
7f3f7120 Set content-type header to
application/json
-
c76ff4d8 moved packer into separate package
-
073edccd updated tests from graphql-js
-
3a9ac368 validation: improved overlap check
-
f86c8b01 allow multiple schemas in tests
-
77750960 validation: OverlappingFieldsCanBeMerged
-
e7ca4fde refactor: remove SelectionSet type
-
7aad6ba7 refactor: use schema.NamedType
-
fddcbcb7 resolves #92: fix processing of negative scalars during parse literals
-
48c1a0fb Small fix based on feedback.
-
e90d1089 allow custom types as input arguments
-
dd3d39e2 fix panic when variable name not declared
-
c2bc105f validation: NoUnusedVariables
-
4aff2976 refactor
-
0933d241 validation: VariablesInAllowedPosition
-
83e2f31a validation: NoUndefinedVariables
-
c39ffeca validation: PossibleFragmentSpreads
-
47c5cde7 validation: UniqueInputFieldNames
-
94cb2918 big refactoring around literals
-
3d63ae80 some refactoring
-
969dab9d merged lexer into package "common"
-
a9de6171 renamed lexer.Literal to lexer.BasicLit
-
d39712c8 refactor addErrMultiLoc
-
ee5e1c3b validation: updated tests
-
490ad6b2 validation: NoUnusedFragments
-
da85f09d add path to errors on resolver error or panic (closes #86)
-
4c40b305 show all locations in error string
-
5c26f320 fix limiter
213a5d01 Warn if an interface's resolver has a ToTYPE implementation that does not return two values.
Currently this instead crashes fairly inscrutably at runtime here: https://github.com/neelance/graphql-go/blob/master/internal/exec/exec.go#L117
An alternate fix would be to check len(out) there and perhaps rely on out[0] being nil to continue if there's only one return value.
67e6f91d use encoding/json to encode scalars
There are some edge cases that are better handled by the proven encoder of encoding/json, for example special characters in strings.
-
3f1cb6f8 implement user defined logger (with sensible defaults)
-
b357f464 built-in json encoding
-
2d828770 refactor: collect fields to resolve
-
32f8b6ba refactor: replaced MetaField
-
b95c566e simplify schema introspection
-
4200a584 split internal/exec into multiple packages
-
c11687a7 refactored internal/exec
-
bd742d84 WIP
-
d09dd543 added SchemaOpt
-
1dcc5753 fix Schema.ToJSON
-
4f07e397 pass variable types to tracer
-
36e6c97e readme: remove outdated section about opentracing
-
0b143cca refactor: apply before exec
a9920602 pluggable tracer
Improved performance while keeping flexibility.
-
58d3d5b8 refactored exec.Request
-
9dd714ec refactored execField some more
-
a43ef241 refactor: meta fields
-
48931d17 refactor fieldExec
-
ee95710d small cleanup
-
84baade5 perf: create span label only once
-
a16ed600 improved concurrency architecture
aef3d9cf Add testing.go into its own package (gqltesting)
This is done so that "testing" (and especially its registered cli flags) aren't included in any production builds.
-
f78108a3 validation: meta fields
-
c6ab2374 added empty file to make CI happy
-
d59c1709 fix introspection of default value
-
42608a03 clean up now unnecessary check
-
e45f26dd validation: UniqueDirectivesPerLocation
-
dcf7e59f validation: UniqueFragmentNames
-
eeaa510b validation: UniqueOperationNames
-
a5a11604 refactor: Loc on Field
-
b5919db4 validation: UniqueVariableNames
-
8632753a validation: ScalarLeafs
-
45844984 validation: ProvidedNonNullArguments
-
c741ea84 validation: VariablesAreInputTypes
-
0875d74f validation: UniqueArgumentNames
-
1fdab07f validation: LoneAnonymousOperation
-
090df527 validation: KnownTypeNames
-
f99ca95e refactor: validation context
-
8aac2817 validation: KnownFragmentNames
-
eae3efc9 validation: KnownDirectives
-
70581168 refactor: separate InlineFragment and FragmentSpread
-
d6aec0d6 renamed schema.Directive to DirectiveDecl
-
b616eeca validation: KnownArgumentNames
-
885af607 refactor: Location without pointer
-
5a40251c tests: filter errors to currently tested rule
-
9c054f53 refactor: lexer.Ident
-
254afa8a validation: fragment type
-
b6ef81af added test export script
-
95a4ecd8 validation: fields
-
c387449f validation: default values
-
44c6e634 validation: arguments
-
30dcc339 directive arguments as slice
-
d331ac27 input values as slice
-
615afd61 fields as slice
-
60759904 arguments as slice
-
f7d9ff4e refactor literals
-
2e1fef01 keep track of location of arguments
-
29e0b375 added EnumValue type
-
aa868e8d resolve fragments early
-
adeb53d6 remove resolver from query package
-
2e23573f parse directive decl without arguments
-
e06f5855 support for "deprecated" directive on enum values
-
498fe396 support for @deprecated](https://github.com/deprecated) directive on fields (fixes [#64)
-
93ddece9 refactor: DirectiveArgs
-
8f5605a1 refactor directives
-
faf5384a simplify parseArguments
-
b2c2e906 some more docs
-
f4516523 added some method documentations
-
91bd7f88 improved meta schema
-
10dc8ee6 added support for directive declarations in schema
-
28028f66 readme: more info on current project status
-
e9afca38 hint in error if method only exists on pointer type (fixes #60)
-
e413f4ed make gocyclo happy
-
6e92795e fix spelling
-
306e27ef gofmt -s
-
612317b2 fix ToJSON
-
728e57a9 improved doc for MaxParallelism
-
e8590a10 don't execute any further resolvers after context got cancelled
-
644435cc added MaxParallelism
-
21802a33 readme: add Sourcegraph badge
-
5b2978fc added support for recursive input values
-
8c84afb1 improved structure of "make exec" code
-
d5a6ca49 make sure internal types don't get exposed
-
c9d4d865 fixed some null handling
-
a336dd4b added request.resolveVar
-
943f80f4 added unmarshalerPacker type
-
f77f7339 refactored non-null handling in packer
-
ae0f1689 remove hasDefault flag from makePacker
-
9cbad485 allow Unmarshaler for all types, not just scalars
-
f565a119 refactored "make exec" code
-
07a09e5d properly check scalar types of result values
-
ecceddec Add ResolverError field to QueryError for post processing
-
b7c59ab9 renamed type
-
5817d300 moved some introspection code into new package, added Schema.Introspect
cdef8563 removed SchemaBuilder
It is not necessary any more. Simpler API wins.
-
8112e719 fix wrong import statement
-
2b513d7e improved custom types
-
191422c4 merged code for value coercion and packing
-
232356b3 introspection for "skip" and "include" directives (fixes #30)
-
61eca4c7 pretty print SchemaBuilder.ToJSON
-
5e09ced1 fix "null" value for empty descriptions of types
-
33cd194f SchemaBuilder.ToJSON instead of SchemaToJSON (fixes #29)
-
fff173bc proper error message when using non-input type as input (#19)
-
b94f2afe improved support for null
-
4130d540 added support for input object literals
-
663e466f moved some code into separate file
-
728e071e added support for lists as input values (fixes #19)
-
86f0f145 fix Float literals
-
0b3be40c improved tracing
-
da879f4f small improvements to readme
-
f3f24cf6 added some documentation
-
38598d83 added CI badge to readme
-
5ce3ca69 testing: proper error on invalid ExpectedResult
-
8f7d2b1e added relay.Handler
-
0dd38747 star wars example: pass operation name and variables (#8)
-
3b7efd5c fix __typename for concrete object types (fixes #9)
-
35667eda testing tools
-
84571820 only create schema once for tests
-
de113f96 added MustParseSchema
-
d5e5f609 improved structure for tests
-
947a1a3a added package with tools for Relay
-
65f3e2b1 fix SchemaToJSON
-
cec7cea1 better error handling
-
e3386b06 improved type coercion and explicit ID type
-
bdfd5ce3 use custom error type less
-
0a7a37d1 more flexible API for creating a schema
-
bd20a165 improved type handling
-
ffa9fea4 renamed GraphQLError to QueryError
-
fcfa135a refactor
-
c28891d8 added support for OpenTracing
-
2cf7fcc8 added SchemaToJSON
-
f6b498ac stricter type mapping for input values
-
3c15e177 execute mutations serially
-
1faf6661 fix missing error
-
de9b7fed add support for mutations
-
094061d8 improved error handling a bit
-
cdb088d6 refactor: args as input object
-
b06d3941 refactor: values
-
4fd33958 refactor: improved type system
1d03e667 refactor: new package "common"
package "query" does not depend on "schema" any more
-
1a959516 refactor
-
f8cb11c1 example/starwars: use interface base type to make type assertions nicer
-
746da4b8 star wars example: friendsConnection
-
bec45364 parse type in query
-
be87a8fa remove unused code
-
042e306a simpler way to resolve type refs in schema
-
7cbf85fb improved type checking of arguments
-
2b6460ae type check for scalars
-
17034fe7 improved null handling
-
e6b6fbca small cleanup
-
7b8cd1bc meta schema from graphql-js
-
9333c0b3 introspection: inputFields
-
c4faac56 introspection: ofType
-
86da8492 introspection: interfaces and possibleTypes
-
20dbb845 proper nil support for lists
-
2e3369ae resolve types in schema package
-
7da95f4a introspection: enum values
-
cb423e6e improved handling of scalar types
-
5b07780f introspection: original order for fields and args
-
1e2d180c introspection: arguments
-
f21131bb refactored schema to be more in line with introspection
-
0152d4f2 introspection: currently no descriptions and deprecations
-
ad5689bb field introspection
-
2749d814 removed query.TypeReference
2eb105ec Revert "resolve scalar types in exec"
This reverts commit fb3a6fc969b0c8c286c7d024a108f5696627639c.
-
40682d68 removed exec.typeRefExec
-
64ea90fe makeWithType
-
2966f213 added nonNilExec
-
c12a8ad3 added support for ints and floats in query
-
0f85412b improved example
-
22ce46d1 support for optional error result
-
0fe56128 optional context parameter
-
f1bc9b21 syntax errors with proper line and column
-
ae299efc proper response format
-
9619721b added support for contexts
-
267fc631 refactor
-
2e56e7ea renamed NewSchema to ParseSchema
-
356b6e6b added godoc badge
-
03f2e72d added README.md
-
1134562a added non-null type
-
8fa41551 renamed Input to InputObject
-
6f2399aa introspection: type kind
-
e2c58f2f refactor: schema types for interface and input
-
0c8c9436 introspection: __type
-
99a37521 refactoring: calculate "implemented by" in schema package
-
1cac7e56 introspection: queryType
-
cc348faf first bit of introspection
-
fb3a6fc9 resolve scalar types in exec
-
4cb8dcc0 panic handlers
-
c7a528d4 proper error handling when creating schema
-
ae37381c add support for __typename
-
4057080f add support for union types
-
d304a418 attribute source of star wars schema
-
0fcab871 added LICENSE
-
0dc0116d support for inline fragments
-
f5e7d070 support for type assertions
-
fcb853c6 refactoring: addResultFn
-
741343f8 explicit fragment spread exec
-
73759258 all missing stubs for star wars example
-
edc78e2b parallelism
-
fb633714 collect fields
-
08f02a2b execs
-
d70d16c4 added server example
-
6f9a89db separate example/starwars package
-
e4060db5 added support for directives
-
89b06652 added support for variables
-
78065ecb added support for enums
-
18645e60 added support for query fragments
-
84f532b9 added support for aliases
-
59d2a619 improved support for arguments
-
edce4ec8 proper star wars data
-
d6ffc01d syntax support for full star wars schema
-
b5824104 support for comments
-
2f9ce9b4 support for entry points
-
0b3d1038 support for arguments
-
cff8b302 support for arrays
-
565e59f5 schema package
-
1ae71ba2 query package
-
42c13e7a named types, complex objects
-
bf64e5da initial commit