From 29fb3293f227a17f41bd057a8d6010bef549815d Mon Sep 17 00:00:00 2001 From: Rob Winch Date: Fri, 21 Jul 2023 07:56:25 -0500 Subject: [PATCH] Fix include-code macro --- spring-graphql-docs/antora.yml | 2 +- .../modules/ROOT/pages/graalvm-native.adoc | 4 ++-- spring-graphql-docs/modules/ROOT/pages/graphiql.adoc | 2 +- spring-graphql-docs/modules/ROOT/pages/transports.adoc | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/spring-graphql-docs/antora.yml b/spring-graphql-docs/antora.yml index ee468af5..5663081e 100644 --- a/spring-graphql-docs/antora.yml +++ b/spring-graphql-docs/antora.yml @@ -16,7 +16,7 @@ asciidoc: attribute-missing: 'warn' chomp: 'all' docs-site: https://docs.spring.io - import-java: 'example$docs-src/main/java/org/springframework/graphql/docs' + include-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} diff --git a/spring-graphql-docs/modules/ROOT/pages/graalvm-native.adoc b/spring-graphql-docs/modules/ROOT/pages/graalvm-native.adoc index d0e32318..bfea8719 100644 --- a/spring-graphql-docs/modules/ROOT/pages/graalvm-native.adoc +++ b/spring-graphql-docs/modules/ROOT/pages/graalvm-native.adoc @@ -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 diff --git a/spring-graphql-docs/modules/ROOT/pages/graphiql.adoc b/spring-graphql-docs/modules/ROOT/pages/graphiql.adoc index f76d609e..ffaaa206 100644 --- a/spring-graphql-docs/modules/ROOT/pages/graphiql.adoc +++ b/spring-graphql-docs/modules/ROOT/pages/graphiql.adoc @@ -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 diff --git a/spring-graphql-docs/modules/ROOT/pages/transports.adoc b/spring-graphql-docs/modules/ROOT/pages/transports.adoc index b44e4e36..a79f7782 100644 --- a/spring-graphql-docs/modules/ROOT/pages/transports.adoc +++ b/spring-graphql-docs/modules/ROOT/pages/transports.adoc @@ -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