Rossen Stoyanchev
21d9791484
Update reference docs for access to HTTP headers
...
Also rename existing methods for request headers to be consistent with
those for response headers and use "Http" in the name.
Closes gh-74
2021-10-01 17:36:49 +01:00
Rossen Stoyanchev
762b9f06c2
Support query files for input in GraphQlTester
...
Closes gh-67
2021-10-01 17:36:49 +01:00
Rossen Stoyanchev
5a07883f6a
Make TestExecutionResult package private
2021-10-01 17:36:49 +01:00
Rossen Stoyanchev
6777d7613b
Make GraphQlTester builders and request strategies top level classes
2021-10-01 17:36:49 +01:00
Rossen Stoyanchev
e644e5e192
Support classes for Builder, RequestStrategy, and RequestSpec
...
Also separate RequestStrategy from WebRequestStrategy since those are
delegated to internally and never used as a hierarchy. The generics
required to make them extend from each other bring no benefit.
2021-10-01 17:36:49 +01:00
Rossen Stoyanchev
65b5ff9a7c
WebGraphQlTester exposes HTTP response headers
...
Closes gh-74
2021-10-01 17:36:49 +01:00
Rossen Stoyanchev
fb8e82dcc0
Inline GraphQlTesterBuilderConfig in DefaultGraphQlTester
...
It's simpler to pass the config options explicitly.
2021-10-01 17:36:49 +01:00
Rossen Stoyanchev
f0f883cc39
Inline RequestSpecDelegate in DefaultGraphQlTester
...
The delegate has almost no logic, simply holding fields and calling the
RequestStrategy, so it adds cognitive overhead without benefit.
2021-10-01 17:36:49 +01:00
Brian Clozel
762f59b2f3
Configure compiler conventions in modules
...
This commit applies the Compiler Conventions Gradle plugin to the
project modules and fix the issues raised by the compiler linter.
This commit also moves version management to the main build file for a
few dependencies, aligning the versions in the process.
2021-09-16 19:54:25 +02:00
Rossen Stoyanchev
89d89e38ff
Use WebInput#toMap in DefaultWebGraphQlTester
...
It doesn't cause any issues but noticed from logging output that when
WebTestClient is used, we are serializing all of it, rather than just
the RequestInput properties.
2021-07-15 20:21:24 +01:00
Rossen Stoyanchev
69c2d08c71
Remove formatter-on/off comments
2021-07-06 15:51:50 +01:00
Rossen Stoyanchev
04d6a72eec
Use RequestInput as the input for GraphQlService
2021-07-02 21:20:09 +01:00
Rossen Stoyanchev
bbf152a32f
Deserialize errorType from extensions
...
The errorType field on GraphQLError is specific to GraphQL Java and when
serialized via GraphqlErrorHelper#toSpecification it becomes an
extension with the key "classification".
This commit ensures that we correctly deserialize back to errorType from
the "classification" extension but unfortunately that's limited to the
ErrorClassification enums that we know of.
2021-06-29 14:53:50 +01:00
Rossen Stoyanchev
5822f7d357
Add @Nullable to TestGraphQlError
2021-06-27 21:51:05 +01:00
Rossen Stoyanchev
0b71596aa5
Global error filter in GraphQlTester.Builder
...
See gh-66
2021-06-27 21:50:37 +01:00
Rossen Stoyanchev
5cd1e266b4
Parameterize GraphQlTester.RequestSpec
...
This ensures that the order in which inputs are provided, i.e. whether
taken from the base RequestSpec or the Web subtype doesn't matter.
See gh-64
2021-06-27 21:50:00 +01:00
Rossen Stoyanchev
56ccaf685b
GraphQlTester and WebGraphQlTester builders
...
Closes gh-66
2021-06-27 21:49:40 +01:00
Rossen Stoyanchev
4a6c718394
WebGraphQlTester supports HTTP header input
...
Closes gh-64
2021-06-26 17:48:30 +01:00
Rossen Stoyanchev
410948bde3
Undo more auto-formatting changes
2021-06-26 17:48:00 +01:00
Rossen Stoyanchev
de234c94c4
Decouple GraphQlTester from Web details
...
Closes gh-65
2021-06-26 05:16:35 +01:00
Brian Clozel
39937679e3
Apply Spring JavaFormat to Spring GraphQL Test
...
See gh-54
2021-06-02 14:30:00 +02:00
Rossen Stoyanchev
484fb932ef
Replace QL with Ql for consistency with Spring naming
2021-05-14 21:32:54 +01:00
Rossen Stoyanchev
44a034ef3d
Refine use of "query" in type and method names
...
Following revisions in the spec
https://github.com/graphql/graphql-spec/pull/777 , this commit applies
similar changes to type and method names where feasible.
The chief exception for now is the use of "query" for request input
since that is what it is called in the JSON for GraphQL over HTTP.
2021-05-12 09:50:03 +01:00
Rossen Stoyanchev
f93c46eee3
WebInterceptor contract revision
...
WebInterceptor now uses delegation, forming a chain of interceptors
followed by a GraphQLService at the end to invoke graphql.GraphQL.
Closes gh-49
2021-04-30 21:26:26 +01:00
Rossen Stoyanchev
00b01ee524
Rename package for GraphQLTester
2021-04-26 21:59:52 +01:00
Rossen Stoyanchev
403019521c
Rename spring-graphql-web to spring-graphql
...
Re-purpose spring-graphql-web to be more general than just web and add
org.springframework.web as a top-level package for web support.
2021-04-26 21:42:36 +01:00
Rossen Stoyanchev
a57b78e521
Improve GraphQLTester error checking API
...
This commit introduces a dedicated ErrorSpec with the option to filter
out expected errors through Predicates.
2021-04-20 11:08:01 +01:00
Rossen Stoyanchev
efb72c7d13
Add tests for GraphQLTester
...
See gh-43
2021-04-15 13:00:52 +01:00
Rossen Stoyanchev
e22d3e8ea4
Add GraphQLTester
...
See gh-43
2021-04-15 13:00:20 +01:00