Commit Graph

153 Commits

Author SHA1 Message Date
Sunli
3b45708959 Update cursor_connections.md 2021-04-05 12:27:47 +08:00
Daniel Sonck
7d817633f3 Update cursor_connections.md
Add the necessary `async move` to the block.
2021-04-05 12:25:54 +08:00
tobi
87b7c28536 Document SDL schema export in the book 2021-04-03 11:41:37 +02:00
Sunli
15036be792 Add ComplexObject macro. #355 2021-03-18 10:13:46 +08:00
Taiki Endo
05b86e3f3c Update subscription.md 2021-03-09 22:34:29 +09:00
Taiki Endo
95987cd000 Update apollo_tracing.md 2021-03-06 22:22:28 +09:00
Sunli
a456faa511 Update books. 2021-03-04 12:13:08 +08:00
Sunli
3becef4483 Update book. 2021-02-22 09:52:41 +08:00
Sunli
610fe21536 Update book. 2021-02-06 16:38:45 +08:00
Lee Benson
d3373fd7e8 Fix for default_with
Signed-off-by: Lee Benson <lee@leebenson.com>
2021-01-19 09:53:29 +00:00
Sunli
457fb4223a Update book. 2021-01-16 08:08:36 +08:00
Lee Benson
a124f04754 generic objects (#390) 2021-01-15 22:07:29 +08:00
Ejez
7f97bf0d12 Fix some book typos (#378) 2021-01-06 22:04:37 +08:00
weihuliu
6605844faa add zh-CN/integrations_to_tide.md (#363)
* add zh-CN/integrations_to_tide.md
2020-12-31 08:05:24 +08:00
Sunli
95a80e7861 Update integrations_to_tide.md 2020-12-29 19:54:49 +08:00
krevativ
f2b42aa094 Add tide integration book section 2020-12-28 21:19:55 +01:00
Sunli
3e6339e630 Improve dataloader 2020-12-22 10:04:21 +08:00
Sunli
f58fe85822 Update docs. 2020-12-21 19:23:51 +08:00
Sunli
5120813937 Update docs. 2020-12-18 23:10:57 +08:00
Sunli
bf9e3ec578 Improve depth and complex. 2020-12-18 18:56:28 +08:00
Sunli
56b60a0f56 Update docs 2020-12-15 10:05:44 +08:00
Daniel Wiesenberg
e5d1501336 Add Rocket integration to README and book 2020-10-26 08:35:31 +01:00
Sunli
ec3e1a9044 Update book 2020-10-16 11:12:17 +08:00
Sunli
4fa4b25ce4 Fix can no longer derive Union for union types with lifetimes. #311 2020-10-15 08:53:17 +08:00
Sunli
062bb10765 Update book 2020-10-14 09:17:00 +08:00
Sunli
59575fdb57 Update book 2020-10-14 09:10:06 +08:00
Sunli
39ba3b4aec Update book 2020-10-14 08:03:51 +08:00
Sunli
35ce31ef78 Update introduction.md 2020-10-14 07:36:54 +08:00
Sunli
d03ad2d50d Update book (#310)
Update book
2020-10-13 23:13:36 +08:00
Sunli
003631e76b Update define_simple_object.md 2020-10-13 10:52:04 +08:00
Sunli
38bab77bdb Update book 2020-10-13 10:36:57 +08:00
Sunli
48d45309be Update book. 2020-10-13 07:35:30 +08:00
Sunli
87ba51fdd0 Some improvements. 2020-10-10 16:28:07 +08:00
Sunli
e170d3b735 Update docs. 2020-10-07 13:40:03 +08:00
AurelienFT
53eab09f19 Rework guard (#296)
Rework guard #293
2020-10-06 17:16:51 +08:00
Roman Kudryashov
71fa94392a Fix custom scalars doc 2020-10-04 12:21:53 +03:00
Sunli
323dbf8a87 Update docs 2020-10-02 15:34:20 +08:00
Sunli
ad08f1dce7 Update docs 2020-10-01 11:24:30 +08:00
Sunli
dd537af508 Merge branch 'master' of https://github.com/async-graphql/async-graphql 2020-10-01 11:23:33 +08:00
Sunli
87d39318b5 Update docs. 2020-10-01 11:23:24 +08:00
Sunli
900392949e Merge pull request #291 from async-graphql/rework-errors
Rework errors
2020-10-01 11:18:23 +08:00
Chip Senkbeil
0a5a8f243d Add flatten union documentation 2020-09-30 21:44:47 -05:00
Koxiaet
768b666acd Merge master 2020-09-30 18:24:24 +01:00
Koxiaet
50009b66ce Rework errors
This completely overhauls the error system used in async-graphql.
- `Error` has been renamed to `ServerError` and `FieldError` has been
renamed to just `Error`. This is because `FieldError` is by far the most
common error that users will have to use so it makes sense to use the
most obvious error name. Also, the current name didn't make sense as it
was used for things other than field errors, such as the data callback
for websockets.
- `ServerError` has been made completely opaque. Before it was an enum
of all the possible errors, but now it just contains an error message,
the locations, the path and extensions. It is a shame that we lose
information, it makes more sense as _conceptually_ GraphQL does not
provide that information. It also frees us to change the internals of
async-graphql a lot more.
- The path of errors is no longer an opaque JSON value but a regular
type, `Vec<PathSegment>`. The type duplication of `PathSegment` and
`QueryPathSegment` is unfortunate, I plan to work on this in the future.
- Now that `ServerError` is opaque, `RuleError` has been removed from
the public API, making it simpler.
- Additionally `QueryError` has been completely removed. Instead the
error messages are constructed ad-hoc; I took care to never repeat an
error message.
- Instead of constructing field-not-found errors inside the
implementations of field resolvers they now return `Option`s, where a
`None` value is representative of the field not being found.
- As an unfortunate consequence of the last change, self-referential
types based on the output of a subscription resolver can no longer be
created. This does not mean anything for users, but causes lifetime
issues in the implementation of merged objects. I fixed it with a bit of
a hack, but this'll have to be looked into further.
- `InputValueError` now has a generic parameter - it's kind of weird but
it's necessary for ergonomics. It also improves error messages.
- The `ErrorExtensions` trait has been removed. I didn't think the
`extend` method was necessary since `From` impls exist. But the
ergonomics are still there with a new trait `ExtendError`, which
is implemented for both errors and results.
- `Response` now supports serializing multiple errors. This allows for
nice things like having multiple validation errors not be awkwardly
shoved into a single error.
- When an error occurs in execution, data is sent as `null`. This is
slightly more compliant with the spec but the algorithm described in
<https://spec.graphql.org/June2018/#sec-Errors-and-Non-Nullability> has
yet to be implemented.
2020-09-29 20:06:44 +01:00
Sunli
e60864a18d Rework async-graphql-derive. #288 2020-09-29 16:06:10 +08:00
Sunli
97ffe25f9f Update book. 2020-09-28 14:43:12 +08:00
Sunli
c914622ff0 Update docs 2020-09-28 09:31:19 +08:00
Chip Senkbeil
0bb9f53d79 Add remote enum documentation
Add book documentation about remote option for enums (#276)
2020-09-27 14:02:10 -05:00
Sunli
451f425813 Remove all GQL prefix. #208 2020-09-20 13:44:20 +08:00
Sunli
e645e9d999 Remove the GQL prefix of all macros. #208 2020-09-18 09:10:24 +08:00