Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.4.0 Release #247

Merged
merged 87 commits into from
Aug 3, 2018
Merged

0.4.0 Release #247

merged 87 commits into from
Aug 3, 2018

Conversation

vektah
Copy link
Collaborator

@vektah vektah commented Aug 2, 2018

We are getting ready to ship 0.4.0. Lots of changes, we are doing some internal testing now.

Updating to 0.4.0 is going to require a few things:

  • Update any references to github.com/vektah/gqlgen to point to github.com/99designs/gqlgen
  • Delete any existing generated code to remove broken imports paths
  • Run dep ensure -update github.com/99designs/gqlgen github.com/vektah/gqlparser
  • Update your handler from graph.NewExecutableSchema(&graph.Graph...) to graph.NewExecutableSchema(graph.Config{Resolvers: &graph.Graph...})
  • go generate ./...

Removed

  • The old (underscore separated) resolver syntax is no longer supported

Changed

  • Moved repo from github.com/vektah/gqlgen to github.com/99designs/gqlgen
  • Switched the parser over to gqlparser, which brings us up to date with the June 2018 spec. This includes better directive support and a bunch of bug fixes around validation.
  • The implicit prelude no longer includes custom types defined by gqlgen. This means if you are using Map or Time you will need to add scalar Map to your schema. The default implementations are still provided, but the type isn't being included automatically in the schema.
  • A bunch of internal interfaces have changed slightly. They should all break in fairly obvious ways.
  • To support directives NewExecutableSchema now takes a config object.
  • Generated models are now more linter friendly, following the same capitalization rules in go lint for common acronyms.
  • ResolverMiddleware has been renamed to FieldMiddleware, and now runs on every field.

Added

  • gqlgen init: You can now create a project skeleton quickly and easily
  • gqlgen will now generate resolver stubs if you specify the new resolver config key.
  • Support for field directives in schema: This is the most common use case, more will follow. see Plugin System #228 for planning for other directive types.
  • Support for @skip and @include
  • Added ability to map to different field names when binding to existing models

Fixed

  • Scalars passed into array contexts will now correctly be coerced into arrays
  • Variables will now have their types validated properly.
  • Large ints in variables were losing precision after 52 bits due to a float bug.

Adam Scarr and others added 30 commits July 18, 2018 17:18
Update gqlparser for validation locations
Bump gqlparser to get schema validation
introduce gen & init subcommand
This is a snowflake implementation for skip/include directives based on
the graphql-js implementation.  Skip takes precedence here.
Adds a set of test cases for skip and include directives to the todo
example. Also now conforms to spec if both are included.
Internally it can still get to RequestContext as required.
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.
* chat
* dataloader
* scalar
* selection
* starwars
* todo
vvakame and others added 27 commits August 1, 2018 10:40
Use fonts from golang styleguide
Make more golint free generated code
Add implicit value to array coercion
use json.Decoder.UseNumber() when unmarshalling vars
@vektah vektah merged commit 7b5a3d7 into master Aug 3, 2018
@vektah vektah deleted the next branch August 3, 2018 06:03
cgxxv pushed a commit to cgxxv/gqlgen that referenced this pull request Mar 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants