Commit Graph

577 Commits

Author SHA1 Message Date
rstoyanchev
d41ced23c4 Add RSocketGraphQlTester
See gh-339
2022-03-29 11:49:54 +01:00
rstoyanchev
8100650183 Improve RSocket tests and minor refactoring
See gh-339
2022-03-29 11:49:19 +01:00
rstoyanchev
a5a5594e64 Pin samples to 1.0.0-M6 2022-03-28 09:15:38 +01:00
rstoyanchev
681a0dcf4d Update documentation for RSocket
See gh-339
2022-03-28 09:15:38 +01:00
rstoyanchev
5b93c1fce7 RSocket support for SubscriptionErrorException
See gh-339
2022-03-28 09:13:51 +01:00
rstoyanchev
3090328666 Insert WebSocket in the names of GraphQlMessage[Type]
Those are specific to the GraphQL over WebSocket protocol.

See gh-339
2022-03-28 09:08:58 +01:00
rstoyanchev
eb9a369f00 Rename ~.web package to ~.server
Now that RSocket is included, it's more obvious it's not just web.

See gh-339
2022-03-28 09:07:47 +01:00
rstoyanchev
6584b88301 Shorten names of [Web|RSocket]GraphQlHandlerInterceptor
See gh-339
2022-03-28 09:07:11 +01:00
rstoyanchev
36425afb0e Add interception for RSocket handler
See gh-339
2022-03-28 09:06:11 +01:00
rstoyanchev
1462050005 Add RSocketGraphQlClient and GraphQlRSocketHandler
See gh-339
2022-03-28 09:05:40 +01:00
rstoyanchev
e71ea056bd Switch to icon without text
Closes gh-329
2022-03-22 18:47:38 +00:00
Brian Clozel
89b174d9ee Fix CI release pipeline for changelog and promotion
Now that the CHANGELOG generation and the release promotion tasks are
using external container images to perform tasks, we should not rely on
the ci-image to execute them.
2022-03-22 18:01:21 +01:00
Brian Clozel
f650c56d67 Compile against latest milestones
This commit ensures that we compile against the latest milestones
released. This is mandatory before releasing our own milestone.
2022-03-22 15:55:09 +01:00
rstoyanchev
0e2c5be01b Minor refactoring
Avoid creating a map for a nested list.

See gh-280
2022-03-22 14:22:05 +00:00
rstoyanchev
fc1e05bbf0 Fix variable names following recent rename 2022-03-22 14:22:05 +00:00
rstoyanchev
7e43223031 Polishing
See gh-280
2022-03-22 12:33:49 +00:00
rstoyanchev
0ecf921ce9 GraphQlArgumentInitializer support for BindException
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
2022-03-22 11:31:22 +00:00
rstoyanchev
98b70c3afe Polishing 2022-03-22 04:17:48 +00:00
rstoyanchev
09a12586e7 Polishing 2022-03-21 17:42:33 +00:00
rstoyanchev
1f53a555da Polishing 2022-03-21 17:37:25 +00:00
rstoyanchev
9bc4c40a24 Re-enable samples 2022-03-21 16:33:54 +00:00
rstoyanchev
83001522f6 Refactoring in DefaultGraphQlTester
Align with similar changes in GraphQlClient.
2022-03-21 15:04:53 +00:00
rstoyanchev
4d50ecd6f1 Revise JSON path options in GraphQlTester
Closes gh-278
2022-03-21 11:34:04 +00:00
rstoyanchev
3d638918f4 Polishing
Closes gh-327
2022-03-21 10:05:28 +00:00
Koen Punt
4e63970175 Fix implementation of containsExactly
See gh-327
2022-03-21 10:05:28 +00:00
rstoyanchev
e3ac804015 Temporarily disable samples 2022-03-21 09:05:49 +00:00
rstoyanchev
dfff40085c Rename [Web|Socket]Interceptor
Use more qualified names [Web|Socket]GraphQlHandlerInterceptor to
differentiate with ClientGraphQlInterceptor and to align with other
types in the same package.
2022-03-21 09:04:52 +00:00
rstoyanchev
c0f97d3f9b Move WebInterceptorChain into WebInterceptor
Shorter name on method declaration within the interceptor, also for
consistency with GraphQlClientInterceptor.
2022-03-21 04:27:24 +00:00
rstoyanchev
bb6280863a Update documentation for client interception
See gh-322
2022-03-21 04:27:06 +00:00
rstoyanchev
f54ee52d62 Add WebSocketGraphQlClientInterceptor
See gh-322
2022-03-21 04:26:39 +00:00
rstoyanchev
92547de5d0 Add client side interception
Closes gh-332
2022-03-21 04:25:54 +00:00
rstoyanchev
bb4ebf6cb8 Correct names of AbstractDirectTransport and subclasses
See gh-332
2022-03-21 04:24:26 +00:00
rstoyanchev
91e7f285fa Shorten GraphQlResponse[Field|Error] and rename GraphQlService
Rename GraphQlService to ExecutionGraphQlService following the renaming
of the request and response to ExecutionGraphQl[Request|Response].

See gh-332
2022-03-21 04:23:59 +00:00
rstoyanchev
67711f7331 Rename Web[Input|Output] to WebGraphQl[Request|Response]
See gh-332
2022-03-21 04:23:34 +00:00
rstoyanchev
182e9e66f0 Extract ExecutionGraphQl[Request|Response] interfaces
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
2022-03-21 04:22:01 +00:00
rstoyanchev
be05b031d6 Extract GraphQlRequest interface
See gh-332
2022-03-21 04:21:33 +00:00
rstoyanchev
08597c9e8a Recreate SimpleTypeConverter if ConversionService not set
Closes gh-315
2022-03-21 04:21:02 +00:00
rstoyanchev
982cbbaa45 Extract GraphQlResponseField in the top-level package
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
2022-03-18 18:19:15 +00:00
rstoyanchev
cdd8b67fed Refine GraphQlResponseField getError()
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
2022-03-18 18:19:15 +00:00
rstoyanchev
827b70b71d Update GraphQlResponseError contract
Add a String path representation making it easy to filter errors by
path using String comparison, and refine nullability.

Take advantage of the String error paths to simplify internal filtering
of error fields.

See gh-10
2022-03-18 18:19:15 +00:00
rstoyanchev
db24c8f62b Replace GraphQLError with GraphQlResponseError
This allows exposing additional conveniences for inspecting errors.

See gh-10
2022-03-18 18:19:08 +00:00
rstoyanchev
96135183f5 Refactor MapGraphQlResponse
MapGraphQlResponse is a simple wrapper around the response map exposing
it as GraphQlResponse. It is now package private and made accessible
through a static factory method on GraphQlTransport.

See gh-10
2022-03-17 19:56:31 +00:00
rstoyanchev
3c30376cba Refine null handling in GraphQlClient for retrieve
If a field is null but without errors, i.e. declared optional in the
schema, it is more natural for toEntity to complete empty instead of
raising a FieldAccessException.

This aligns better with the execute method where handling the field
directly allows treating a null but valid field as optional.

See gh-10
2022-03-17 17:27:40 +00:00
Brian Clozel
b2b1e2d506 Document custom className extractor config
This commit documents how to configure a custom className Extractor
strategy in the `ClassNameTypeResolver`. This also adds an example of a
`GraphQlSourceBuilderCustomizer` in Spring Boot.

Closes gh-334
2022-03-17 17:23:38 +01:00
rstoyanchev
9102bdbc77 Replace isValid with hasValue in ResponseField
hasValue is more meaningful because it means valid and with some value
that could be decoded, which in turn allows removing Nullable from
toEntity/List.

Or if there is no value, getError() can be used to differentiate
between a failed field vs a null field declared optional.

See gh-10
2022-03-17 13:37:16 +00:00
rstoyanchev
5e95fcf60a Refine getError(s) methods on ResponseField
getError now returns either the error at the field or on a parent
field, which provides a reliable answer for why a field failed even
for a field whose path is below where the error occurred.

getErrors likewise now also includes errors above. There is still no
need for special logic to get only errors below since where there is
a field value, errors are below anyway.

See gh-10
2022-03-17 13:37:16 +00:00
Mark Paluch
f28d3dc2a0 Initialize ProjectedPayloadMethodArgumentResolver with ApplicationContext
We now initialize the argument resolver with a context instead of
relying on …Aware callbacks that are not supported by
AnnotatedControllerConfigurer.

Closes gh-333
2022-03-17 12:17:21 +01:00
Mark Paluch
4653e94976 Remove raw-type cast in QuerydslDataFetcher
No longer required as Spring Data accepts MultiMap's containing object values.

Closes gh-311
2022-03-16 14:49:16 +01:00
Brian Clozel
22c1472bcc Fix CI pipeline configuration
See gh-331
2022-03-16 14:38:02 +01:00
Brian Clozel
0cf2ce023d Use Concourse Release Script as Docker image in CI
Instead of embeddeding the Concourse Release Scripts application as a
JAR in the CI image, this commit is now using the published Docker image
for this.
2022-03-16 14:26:53 +01:00