Skip to content

Commit

Permalink
Improve documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelnikolov authored and KNiepok committed Feb 28, 2023
1 parent 331f0f4 commit 9aa08a2
Show file tree
Hide file tree
Showing 22 changed files with 503 additions and 345 deletions.
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,35 @@
CHANGELOG

[v1.5.0](https://github.com/graph-gophers/graphql-go/releases/tag/v1.5.0) Release v1.5.0
* [FEATURE] Add specifiedBy directive in #532
* [IMPROVEMENT] In this release we improve validation for primitive values, directives, repeat directives, #515, #516, #525, #527
* [IMPROVEMENT] Fix minor unreachable code caused by t.Fatalf #530
* [BUG] Fix __type queries sometimes not returning data in #540
* [BUG] Allow deprecated directive on arguments by @pavelnikolov in #541
* [DOCS] Add array input example #536


[v1.4.0](https://github.com/graph-gophers/graphql-go/releases/tag/v1.4.0) Release v1.4.0
* [FEATURE] Add basic first step for Apollo Federation. This does NOT include full subgraph specification. This PR adds support only for `_service` schema level field. This library is long way from supporting the full sub-graph spec and we do not plan to implement that any time soon.


[v1.3.0](https://github.com/graph-gophers/graphql-go/releases/tag/v1.3.0) Release v1.3.0
* [FEATURE] Support custom panic handler #468
* [FEATURE] Support interfaces implementing interfaces #471
* [BUG] Support parsing nanoseconds time properly #486
* [BUG] Fix a bug in maxDepth fragment spread logic #492


[v1.2.0](https://github.com/graph-gophers/graphql-go/releases/tag/v1.2.0) Release v1.2.0
* [DOCS] Added examples of how to add JSON map as input scalar type. The goal of this change was to improve documentation #467


[v1.1.0](https://github.com/graph-gophers/graphql-go/releases/tag/v1.1.0) Release v1.1.0
* [FEATURE] Add types package #437
* [FEATURE] Expose `packer.Unmarshaler` as `decode.Unmarshaler` to the public #450
* [FEATURE] Add location fields to type definitions #454
* [FEATURE] `errors.Errorf` preserves original error similar to `fmt.Errorf` #456
* [BUGFIX] Fix duplicated __typename in response (fixes #369) #443


[v1.0.0](https://github.com/graph-gophers/graphql-go/releases/tag/v1.0.0) Initial release
6 changes: 5 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,8 @@
- Your pull request should have no more than two commits, if not you should squash them.
- It should pass all tests in the available continuous integrations systems such as TravisCI.
- You should add/modify tests to cover your proposed code changes.
- If your pull request contains a new feature, please document it on the README.
- If your pull request contains a new feature, please document it well:
* Consider adding Go executable examples
* Comment all new exported types if outside of the `internal` package
* (optional) Mentione it in the README
* Add a comment in the CHANGELOG.md explaining your feature
6 changes: 3 additions & 3 deletions errors/panic_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import (
"context"
)

// PanicHandler is the interface used to create custom panic errors that occur during query execution
// PanicHandler is the interface used to create custom panic errors that occur during query execution.
type PanicHandler interface {
MakePanicError(ctx context.Context, value interface{}) *QueryError
}

// DefaultPanicHandler is the default PanicHandler
// DefaultPanicHandler is the default [PanicHandler].
type DefaultPanicHandler struct{}

// MakePanicError creates a new QueryError from a panic that occurred during execution
// MakePanicError creates a new QueryError from a panic that occurred during execution.
func (h *DefaultPanicHandler) MakePanicError(ctx context.Context, value interface{}) *QueryError {
return Errorf("panic occurred: %v", value)
}
4 changes: 3 additions & 1 deletion example/apollo_federation/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Apollo Federation

A simple example of integration with apollo federation as subgraph. Tested with Go v1.18, Node.js v16.14.2 and yarn 1.22.18.
**NOTE: This library doesn't support the full Apollo Federation subgraph spec!**

A basic example of integration with apollo federation as subgraph. Tested with Go v1.18, Node.js v16.14.2 and yarn 1.22.18.

To run this server

Expand Down
79 changes: 0 additions & 79 deletions example/array_as_argument/server.go

This file was deleted.

65 changes: 0 additions & 65 deletions example/customerrors/server/server.go

This file was deleted.

78 changes: 0 additions & 78 deletions example/customerrors/starwars.go

This file was deleted.

45 changes: 0 additions & 45 deletions example/scalar_map/server.go

This file was deleted.

19 changes: 0 additions & 19 deletions example/scalar_map/types/map.go

This file was deleted.

31 changes: 0 additions & 31 deletions example/scalar_time/server.go

This file was deleted.

Loading

0 comments on commit 9aa08a2

Please sign in to comment.