Commit Graph

23 Commits

Author SHA1 Message Date
Rossen Stoyanchev
b35e5f8c2f WebOutput minor updates
Rename "headers" to "responseHeaders" and clarify those work for HTTP
request queries but not for queries over a WebSocket session.

Update getter for response headers to return a read-only wrapper.

Provide only one public constructor without headers.

See gh-42
2021-04-09 13:05:40 +01:00
Rossen Stoyanchev
ddf107f8b1 WebInput minor refactoring
Use getters so the base RequestInput is usable for JSON serialization,
e.g. for the testing support.

Remove WebSocketMessageInput which only had an extra requestId and
add that to WebInput instead.

See gh-42
2021-04-09 13:05:40 +01:00
Rossen Stoyanchev
4a18932941 Revise GraphQLRequestHandler
Rename to GraphQLService to make it more clear it is a layer below
the specific transport such as HTTP endpoints.

Add WebGraphQLService sub-interface for query execution in web
environment with a WebInterceptor chain.

See gh-42
2021-04-09 08:43:57 +01:00
Rossen Stoyanchev
0338607a9b Parameterize GraphQLRequestHandler
This makes the contract more general and applicable to any GraphQL
request, not necessary coupled to HTTP.

Closes gh-42
2021-04-08 20:37:01 +01:00
Rossen Stoyanchev
b378231d39 Add GraphQLRequestHandler
See gh-42
2021-04-08 20:37:01 +01:00
Rossen Stoyanchev
2f52e35050 Support for subscriptions with WebMvc and spring-websocket 2021-02-01 22:38:52 +00:00
Rossen Stoyanchev
63dc81c922 Polishing and minor fix to remove Subscription 2021-02-01 22:17:27 +00:00
Rossen Stoyanchev
bbb0d98511 Complete fix for "connection_init" not having id
Closes gh-27
2021-01-17 22:05:33 +00:00
Brian Clozel
633ee1a1b5 Refactor project structure
This commit refactors the project structure to regroup GraphQL web
support under the spring-graphql-web module, and move all the Spring
Boot support classes under a single graphql-spring-boot-starter one.

Right now, the starter module contains everything: classes for MVC,
WebFlux and Actuator support as well as required dependencies. We will
change that in the future.
2021-01-05 16:35:34 +01:00
Brian Clozel
3e8027a0ca Upgrade to Spring Boot 2.4.1 2021-01-05 13:12:47 +01:00
Rossen Stoyanchev
63065d4e8e Create webflux and webmvc sub-packages under ~.graphql
Allows simpler and consistent names for HTTP and WebSocket handler
classes for webmvc and webflux.
2021-01-03 21:40:23 +00:00
Rossen Stoyanchev
2e32a06a55 Update to latest GraphQL over WebSocket protocol 2021-01-03 21:40:19 +00:00
Rossen Stoyanchev
bb9d1dc300 Extract WebSocketHandler to top-level class 2021-01-03 21:38:08 +00:00
Rossen Stoyanchev
b10d5f7df7 Add support for subscriptions over WebSocket in WebFlux 2020-11-29 18:53:05 +00:00
Brian Clozel
18f44efe6d Rename and document GraphQL properties 2020-10-13 18:15:20 +02:00
Brian Clozel
95bfe2e318 Support programmatic GraphQLSchema creation
Prior to this commit, the `GraphQLAutoConfiguration` would only consider
the case where the GraphQL schema is read as an SDL from a configured
location.

GraphQL also supports the programmatic creation of the schema and this
case needs to be supported by the auto-configuration.

This commit updates the auto-configuration to disable the schema
creation from the SDL if a `GraphQL.Builder` bean is already contributed
by the application.

Fixes gh-4
2020-10-13 16:16:35 +02:00
Rossen Stoyanchev
7eafec25e3 Support for response headers through WebOutput
See gh-6
2020-10-07 21:36:34 +01:00
Rossen Stoyanchev
cf1e3ce0da Upgrade to Spring Boot 2.4 snapshots
in order to make use of a recent change for WebMvc.fn in
Spring Framework 5.3.

See gh-6
2020-10-07 20:13:34 +01:00
Rossen Stoyanchev
b5d4fe18ab Javadoc updates and rename WebInterceptorExecution 2020-09-28 11:18:42 +01:00
Rossen Stoyanchev
1f1ce72272 Add WebInterceptorExecution
Arguably a better way to encapsulate support for WebInterceptor vs a
base class, more testable, and reduced public API surface.
2020-09-18 22:25:00 +01:00
Rossen Stoyanchev
b0b10dd8d3 Add tests for bad input 2020-09-18 14:36:26 +01:00
Rossen Stoyanchev
aabe780e9a Consistent naming, simplified package structure 2020-09-17 18:52:35 +01:00
Brian Clozel
2693742b63 Add GraphQL web support
This commit removes the controller components and instead moves the web
support to specific auto-configurations.
This commit also adds tests for both web stacks.
2020-09-16 16:34:00 +02:00