Commit Graph

40 Commits

Author SHA1 Message Date
Rossen Stoyanchev
a66b49540b Polishing docs and removing unused code 2021-09-29 18:25:24 +01:00
Rossen Stoyanchev
440b123cc4 Minor refactoring
Rename AnnotatedDataFetcherConfigurer -> AnnotatedControllerConfigurer,
since handler methods are now not only data fetchers but also
batch loaders.

Move DataFetcherHandlerMethod and BatchLoaderHandlerMethod into the
support package next to AnnotatedControllerConfigurer where they're used.

See gh-130
2021-09-29 17:56:08 +01:00
Rossen Stoyanchev
0f37af1b25 Update default extensions in reference docs
See gh-134
2021-09-29 15:59:52 +01:00
Rossen Stoyanchev
5109a1195f Update documentation for @BatchMapping
Closes gh-130
2021-09-28 15:09:39 +01:00
Brian Clozel
b03097ad47 Remove attributes from Argument annotation
Prior to this commit, the `@Argument` annotation would support two
attributes: `required` and `defaultValue`, specifying whether arguments
should be considered as required and default values to use if they're
not present.

This can be problematic as this can already be specified at the schema
level.

To avoid duplication and invalid setups betweens schema and Controllers,
this commit removes those attributes in favor of the schema definition.

Closes gh-150
2021-09-24 13:47:56 +02:00
Brian Clozel
552c4f72d0 Add distribution summary metric for datafetcher calls
This commit adds a new `"graphql.request.datafetch.count"` distribution
summary metric for counting the number of data fetching calls per
request.

Closes gh-146
2021-09-22 16:53:08 +02:00
Rossen Stoyanchev
74ba9061d5 Polishing CORS support 2021-09-22 13:41:39 +01:00
Brian Clozel
17ce7b4838 Simplify asciidoctor setup for reference docs 2021-09-21 22:08:15 +02:00
Brian Clozel
93c696f9bc Allow CORS configuration using config properties
Prior to this commit, a Spring GraphQL application would need to
implement `WebMvcConfigurer` or `WebFluxConfigurer` to register a
specific CORS configuration and map it to the GraphQL endpoint.

This commit adds new configuration properties under the
`spring.graphql.cors.*` namespace that helps configuring CORS for the
GraphQL endpoint.

Closes gh-26
2021-09-21 20:28:48 +02:00
Brian Clozel
543be8429f Introduce version attributes in asciidoctor docs
This commit introduces versions as dynamic attributes in the reference
docs. This also fixes a few incomplete references that were logging
warnings during the documentation build.
2021-09-21 20:28:48 +02:00
Rossen Stoyanchev
b021663f5b Update docs for batch loading
Closes gh-63
2021-09-15 15:54:00 +01:00
Rossen Stoyanchev
a056d5ba06 Add Exceptions section to Boot starter ref docs
See gh-121
2021-09-03 14:01:10 +01:00
Rossen Stoyanchev
a98ca42981 Add resolver for @Argument Map<String, Object>
Closes gh-113
2021-08-31 14:44:47 +01:00
Rossen Stoyanchev
cae12820e4 Replace @GraphQlController in documentation snippets 2021-08-30 16:44:56 +01:00
Rossen Stoyanchev
4bd229d4b9 Deprecate @GraphQlController in favor of @Controller 2021-08-30 14:56:01 +01:00
Rossen Stoyanchev
7495f43670 Support GraphQLContext as a method argument 2021-08-26 19:50:01 +01:00
Rossen Stoyanchev
50eef472c5 Add reference docs for annotated DataFetcher's
Closes gh-90
2021-08-11 05:23:27 +01:00
Rossen Stoyanchev
a78abb7dc8 Polishing and minor refactoring in reference docs 2021-08-10 08:08:04 +01:00
Rossen Stoyanchev
3567a062ab Add RuntimeWiringConfigurer
Closes gh-107
2021-08-09 16:36:18 +01:00
em
a17a2c0af6 Rename RuntimeWiringCustomizer in reference docs
See 9d4ebfe743
Closes gh-102
2021-07-23 09:58:36 +02:00
Rossen Stoyanchev
39702b9745 Extract boot starter docs into a dedicated asciidoc file 2021-07-21 14:30:58 +01:00
Rossen Stoyanchev
69b2476231 Show config for test support in reference docs
Closes gh-96
2021-07-21 14:18:10 +01:00
Rossen Stoyanchev
a316c0411a Add GraphQlRepository annotation and update documentation
See gh-93
2021-07-20 15:59:34 +01:00
Koen Punt
701bfceb41 fix link and typo 2021-07-19 09:51:24 +01:00
Phillip Webb
9073d0d7ce Migrate to spring-asciidoctor-backends
Migrate documentation to use spring-asciidoctor-backends.
2021-07-07 20:30:10 +01:00
Mark Paluch
08d49a848e Refine Querydsl integration documentation
Update repository example to implement Repository. Mention customizing and projection capabilities.

See gh-78
2021-07-06 08:55:31 +01:00
Rossen Stoyanchev
bac7461678 Add DataFetcherExceptionResolverAdapter
The adapter aims to:
- simplify the common case of synchronous resolution to a single error
- support ThreadLocal context propagation on an opt-in basis

This replaces the SyncDataFetcherExceptionResolver and removes the need
to propagate ThreadLocal context to every resolver.
2021-07-05 19:35:04 +01:00
Rossen Stoyanchev
a6211bda93 Minor ref doc updates 2021-07-05 16:04:50 +01:00
Rossen Stoyanchev
553dd3e571 Complete reference documentation
Closes gh-78
2021-07-05 12:26:54 +01:00
Rossen Stoyanchev
10ebbe943c Add Web Transports section to reference docs
See gh-78
2021-07-02 20:26:33 +01:00
Brian Clozel
95a2af06a7 Fix missing header/footer in reference docs 2021-07-02 17:03:01 +02:00
Brian Clozel
d09f371048 Add missing configuration metadata for graphql metrics 2021-07-02 14:57:25 +02:00
Brian Clozel
2be79c2c73 Remove configuration key for GraphQL schema path
Currently, the GraphQL schema is exposed under /graphql/schema (so
relative to the main graphql endpoint) and is configurable with the
`spring.graphql.schema.printer.path` configuration property.

We think we should make the schema location more consistent to help
tools and various Gateway products. Also, we don't see right now a
strong use case for such a configuration property.

This commit removes the configuration property and sets the schema
location under `/graphql/schema`(`/graphql` being the main graphql path
configured by the application).

Closes gh-79
2021-07-02 13:57:36 +02:00
Rossen Stoyanchev
9a23e5f8d3 Restructure reference documentation
This commits sets the structure in place, moves the existing content
into its appropriate place, plus further updates to that content.

See gh-78
2021-07-02 12:47:12 +01:00
Brian Clozel
97a651e4ce Move Javadoc from "javadoc-api" to "api" folder 2021-07-01 09:18:32 +02:00
Brian Clozel
46f210b9d1 Polish documentation 2021-07-01 09:13:19 +02:00
Hantsy Bai
050480fcd6 fix links 2021-07-01 08:39:55 +02:00
Brian Clozel
ef0fe03fce Scan schema locations for well-known file extensions
This commit improves gh-56 to scan schema locations for more well-known
file extensions, as previously only `*.graphqls` was supported.
We're now scanning for `*.graphqls`, `*.gqls`, `*.graphql`, `*.gql`.

Closes gh-56
2021-06-30 21:06:17 +02:00
Brian Clozel
6e871a790b Rename docs artifact 2021-06-30 18:34:57 +02:00
Brian Clozel
34355051b5 Rename docs module
This commit renames the docs module to "spring-graphql-docs" to better
align with other Spring projects and their published docs artifact.
2021-06-30 18:16:27 +02:00