As of #108, the `"application/graphql+json"` media type is supported and
has been made the default.
It seems that it is not ready for adoption now; so while we'll keep
supporting it, this commit reverts back to `"application/json"` as the
default media type for servers and clients.
Closes gh-375
A field may be missing not only due to field errors but also due to a
failed request, so the error message should show either, whichever is
not empty.
Closes gh-348
The GraphQL HTTP spec now requires the `"application/graphql+json"`
content type.
This commit applies this type by default in the server and client
implementations. `"application/json"` is still accepted and produced if
requested by clients.
Closes gh-108
The default transport-specific client and tester extensions contained
their builder implementations, but it makes more sense the other way
around since the extensions are mainly about the builders they provide.
GraphQlArgumentInitializer now keeps track of the argument path and
accumulates binding errors whose field set to the argument path.
In case of a binding error, it continues with other constructor args
or list elements, accumulating as many errors as possible, and raising
a BindingException at the end.
Closes gh-280
Use more qualified names [Web|Socket]GraphQlHandlerInterceptor to
differentiate with ClientGraphQlInterceptor and to align with other
types in the same package.
Rename the implementation classes Request[Input|Output] accordingly to
match the interfaces, and move them into the support package.
Create AbstractGraphQlResponse in the support package that
pre-implements response field access.
This leaves mainly contracts in the top-level package.
See gh-332
GraphQlResponseField is now extracted as a super type at the top-level
package and is exposed from GraphQlResponse. ClientGraphQlResponseField
extends this to provide decoding options.
The change ensures consistency with both GraphQlResponseField and
GraphQlResponseError accessible through GraphQlResponse, also making
both available for client and server side handling.
See gh-10
Instead of a simple check, looking for an associated field error at or
above the field, this method now more focused on finding the reason for
a failure when the field has no value.
This allows performing a more thorough search including cases when the
field error is at, above, or even below (e.g. non-null nested field
that bubbled up), in the end falling back on request errors (e.g.
failed response without any field errors).
Also, rename ResponseField to GraphQlResponseField and move to a
top-level class.
See gh-10