No warnings
This commit is contained in:
committed by
Rossen Stoyanchev
parent
bb9aaaddc8
commit
d485fdf85b
@@ -1,3 +1,6 @@
|
||||
# PACKAGES antora@3.2.0-alpha.2 @antora/atlas-extension:1.0.0-alpha.1 @antora/collector-extension@1.0.0-alpha.3 @springio/antora-extensions@1.1.0 @asciidoctor/tabs@1.0.0-beta.3 @opendevise/antora-release-line-extension@1.0.0
|
||||
#
|
||||
# The purpose of this Antora playbook is to build the docs in the current branch.
|
||||
antora:
|
||||
extensions:
|
||||
- '@springio/antora-extensions/partial-build-extension'
|
||||
@@ -17,10 +20,10 @@ git:
|
||||
ensure_git_suffix: false
|
||||
content:
|
||||
sources:
|
||||
- url: ./..
|
||||
branches: HEAD
|
||||
start_path: spring-graphql-docs
|
||||
worktrees: true
|
||||
- url: ./..
|
||||
branches: HEAD
|
||||
start_path: spring-graphql-docs
|
||||
worktrees: true
|
||||
asciidoc:
|
||||
attributes:
|
||||
page-stackoverflow-url: https://stackoverflow.com/tags/spring-graphql
|
||||
|
||||
@@ -14,4 +14,18 @@ ext:
|
||||
asciidoc:
|
||||
attributes:
|
||||
attribute-missing: 'warn'
|
||||
chomp: 'all'
|
||||
chomp: 'all'
|
||||
docs-site: https://docs.spring.io
|
||||
import-java: 'example$docs-src/main/java/org/springframework/graphql/docs'
|
||||
github-tag: main
|
||||
github-repo: spring-projects/spring-graphql
|
||||
github-raw: https://raw.githubusercontent.com/{github-repo}/{github-tag}
|
||||
github-issues: https://github.com/{github-repo}/issues/
|
||||
github-main-branch: https://github.com/{github-repo}/tree/main
|
||||
github-10x-branch: https://github.com/{github-repo}/tree/1.0.x
|
||||
github-wiki: https://github.com/{github-repo}/wiki
|
||||
graphql-java-docs: https://www.graphql-java.com/documentation
|
||||
javadoc: https://docs.spring.io/spring-graphql/docs/{spring-graphql-version}/api
|
||||
# version attributes from main build.gradle
|
||||
spring-framework-ref-docs: https://docs.spring.io/spring-framework/reference
|
||||
spring-boot-ref-docs: https://docs.spring.io/spring-boot/docs/{spring-boot-version}/reference/html
|
||||
@@ -76,9 +76,27 @@ task api(type: Javadoc) {
|
||||
destinationDir = file("$buildDir/docs/javadoc")
|
||||
}
|
||||
|
||||
//antora {
|
||||
// playbook = 'cached-antora-playbook.yml'
|
||||
// playbookProvider {
|
||||
// repository = 'spring-projects/spring-security'
|
||||
// branch = 'docs-build'
|
||||
// path = 'lib/antora/templates/per-branch-antora-playbook.yml'
|
||||
// checkLocalBranch = true
|
||||
// }
|
||||
// options = [clean: true, fetch: !project.gradle.startParameter.offline, stacktrace: true]
|
||||
//}
|
||||
|
||||
|
||||
antora {
|
||||
playbookProvider {
|
||||
repository = 'spring-projects/spring-security'
|
||||
branch = 'docs-build'
|
||||
path = 'lib/antora/templates/per-branch-antora-playbook.yml'
|
||||
checkLocalBranch = true
|
||||
}
|
||||
options = [clean: true, fetch: !project.gradle.startParameter.offline, stacktrace: true]
|
||||
environment = [
|
||||
environment = [
|
||||
'ALGOLIA_API_KEY': '9d489079e5ec46dbb238909fee5c9c29',
|
||||
'ALGOLIA_APP_ID': 'WB1FQYI187',
|
||||
'ALGOLIA_INDEX_NAME': 'springsecurity',
|
||||
@@ -89,6 +107,7 @@ antora {
|
||||
'@asciidoctor/tabs': '1.0.0-beta.3',
|
||||
'@springio/antora-extensions': '1.4.2',
|
||||
'@springio/asciidoctor-extensions': '1.0.0-alpha.8',
|
||||
'@opendevise/antora-release-line-extension': '1.0.0',
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
1
spring-graphql-docs/modules/ROOT/examples/docs-src
Symbolic link
1
spring-graphql-docs/modules/ROOT/examples/docs-src
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../src/
|
||||
@@ -1,5 +1,4 @@
|
||||
* xref:index.adoc[]
|
||||
* xref:attributes.adoc[]
|
||||
** xref:includes/transports.adoc[]
|
||||
** xref:includes/request-execution.adoc[]
|
||||
** xref:includes/data.adoc[]
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
:chomp: default headers packages
|
||||
:docs-site: https://docs.spring.io
|
||||
:idprefix:
|
||||
:idseparator: -
|
||||
:tabsize: 4
|
||||
:numbered:
|
||||
:sectanchors:
|
||||
:sectnums:
|
||||
:hide-uri-scheme:
|
||||
:docs-java: {docdir}/../../main/java/org/springframework/graphql/docs
|
||||
:docs-kotlin: {docdir}/../../main/kotlin/org/springframework/graphql/docs
|
||||
:docs-resources: {docdir}/../../main/resources
|
||||
:github-tag: main
|
||||
:github-repo: spring-projects/spring-graphql
|
||||
:github-raw: https://raw.githubusercontent.com/{github-repo}/{github-tag}
|
||||
:github-issues: https://github.com/{github-repo}/issues/
|
||||
:github-main-branch: https://github.com/{github-repo}/tree/main
|
||||
:github-10x-branch: https://github.com/{github-repo}/tree/1.0.x
|
||||
:github-wiki: https://github.com/{github-repo}/wiki
|
||||
:graphql-java-docs: https://www.graphql-java.com/documentation
|
||||
:javadoc: https://docs.spring.io/spring-graphql/docs/{spring-graphql-version}/api
|
||||
// version attributes from main build.gradle
|
||||
:spring-framework-ref-docs: https://docs.spring.io/spring-framework/reference
|
||||
:spring-boot-ref-docs: https://docs.spring.io/spring-boot/docs/{spring-boot-version}/reference/html
|
||||
@@ -37,7 +37,7 @@ This is all done automatically for you if you are building a Spring Boot applica
|
||||
If your application is "manually" registering data fetchers, some types are not discoverable as a result.
|
||||
You should then register them with Spring Framework's `@RegisterReflectionForBinding`:
|
||||
|
||||
include::code:GraphQlConfiguration[]
|
||||
include-code:GraphQlConfiguration[]
|
||||
<1> This application declares a `RuntimeWiringConfigurer` that "manually" adds a `DataFetcher`
|
||||
<2> Through this `DataFetcher`, the `BookRepository` will expose a `Book` type
|
||||
<3> `@RegisterReflectionForBinding` will register the relevant hints for the `Book` type and all types exposed as fields
|
||||
@@ -50,7 +50,7 @@ The `AotProcessor` strategy described in the section above cannot be used as a r
|
||||
For client support, Spring for GraphQL embeds the {github-main-branch}/spring-graphql/src/main/resources/META-INF/native-image/org.springframework.graphql/spring-graphql[relevant reachability metadata for the client infrastructure].
|
||||
When it comes to Java types used by the application, applications should use a similar strategy as "manual" data fetchers using `@RegisterReflectionForBinding`:
|
||||
|
||||
include::code:ProjectService[]
|
||||
include-code:ProjectService[]
|
||||
<1> In a Native image, we need to ensure that reflection can be performed on `Project` at runtime
|
||||
<2> `@RegisterReflectionForBinding` will register the relevant hints for the `Project` type and all types exposed as fields
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ Alternatively, you can integrate the JavaScript build in your project as a separ
|
||||
|
||||
Once a GraphiQL build is available on the classpath, you can expose it as an endpoint with the {spring-framework-ref-docs}/web/webmvc-functional.html#webmvc-fn-router-functions[functional web frameworks].
|
||||
|
||||
include::code:GraphiQlConfiguration[]
|
||||
include-code:GraphiQlConfiguration[]
|
||||
<1> Load the GraphiQL page from the classpath (here, we are using the version shipped with Spring for GraphQL)
|
||||
<2> Configure a web handler for processing HTTP requests; you can implement a custom `HandlerFunction` depending on your use case
|
||||
<3> Finally, map the handler to a specific HTTP endpoint
|
||||
|
||||
@@ -105,7 +105,7 @@ handled as `request-stream`.
|
||||
`GraphQlRSocketHandler` can be used a delegate from an `@Controller` that is mapped to
|
||||
the route for GraphQL requests. For example:
|
||||
|
||||
include::code:GraphQlRSocketController[]
|
||||
include-code:GraphQlRSocketController[]
|
||||
|
||||
|
||||
|
||||
@@ -132,13 +132,13 @@ incoming requests and do one of the following:
|
||||
|
||||
For example, an interceptor can pass an HTTP request header to a `DataFetcher`:
|
||||
|
||||
include::code:RequestHeaderInterceptor[]
|
||||
include-code:RequestHeaderInterceptor[]
|
||||
<1> Interceptor adds HTTP request header value into GraphQLContext
|
||||
<2> Data controller method accesses the value
|
||||
|
||||
Reversely, an interceptor can access values added to the `GraphQLContext` by a controller:
|
||||
|
||||
include::code:ResponseHeaderInterceptor[]
|
||||
include-code:ResponseHeaderInterceptor[]
|
||||
<1> Controller adds value to the `GraphQLContext`
|
||||
<2> Interceptor uses the value to add an HTTP response header
|
||||
|
||||
@@ -146,7 +146,7 @@ include::code:ResponseHeaderInterceptor[]
|
||||
request validation errors that are raised before execution begins and which cannot be
|
||||
handled with a `DataFetcherExceptionResolver`:
|
||||
|
||||
include::code:RequestErrorInterceptor[]
|
||||
include-code:RequestErrorInterceptor[]
|
||||
<1> Return the same if `ExecutionResult` has a "data" key with non-null value
|
||||
<2> Check and transform the GraphQL errors
|
||||
<3> Update the `ExecutionResult` with the modified errors
|
||||
|
||||
Reference in New Issue
Block a user