This is an automated email from the ASF dual-hosted git repository. danhaywood pushed a commit to branch CAUSEWAY-3676 in repository https://gitbox.apache.org/repos/asf/causeway.git
commit b3a1f55005c96e617a197586ae3c61ba88323bf3 Author: danhaywood <[email protected]> AuthorDate: Sun Jan 28 14:27:38 2024 +0000 CAUSEWAY-3676: generates refguide for graphql --- .../graphql/applib/auth/UserMementoProvider.adoc | 19 ++++++++++++++++ .../index/graphql/applib/types/TypeMapper.adoc | 26 ++++++++++++++++++++++ core/adoc/modules/_overview/pages/about.adoc | 10 ++++++++- 3 files changed, 54 insertions(+), 1 deletion(-) diff --git a/antora/components/refguide-index/modules/viewer/pages/index/graphql/applib/auth/UserMementoProvider.adoc b/antora/components/refguide-index/modules/viewer/pages/index/graphql/applib/auth/UserMementoProvider.adoc new file mode 100644 index 0000000000..8b6d357216 --- /dev/null +++ b/antora/components/refguide-index/modules/viewer/pages/index/graphql/applib/auth/UserMementoProvider.adoc @@ -0,0 +1,19 @@ += UserMementoProvider +:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...] + +SPI to obtain the xref:refguide:applib:index/services/user/UserMemento.adoc[UserMemento] (in other words the identity of the executing user) from the provided GraphQL _ExecutionContext_ and _ExecutionStrategyParameters_ . + +The framework provides a default implementation (as a fallback) that returns a statically configured user + + *NOTE* : this API is considered experimental/beta and may change in the future. + +== API + +[source,java] +.UserMementoProvider.java +---- +interface UserMementoProvider { + UserMemento userMemento(ExecutionContext executionContext, ExecutionStrategyParameters parameters) +} +---- + diff --git a/antora/components/refguide-index/modules/viewer/pages/index/graphql/applib/types/TypeMapper.adoc b/antora/components/refguide-index/modules/viewer/pages/index/graphql/applib/types/TypeMapper.adoc new file mode 100644 index 0000000000..1a4317d49d --- /dev/null +++ b/antora/components/refguide-index/modules/viewer/pages/index/graphql/applib/types/TypeMapper.adoc @@ -0,0 +1,26 @@ += TypeMapper +:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...] + +SPI to map framework's own datatypes to GraphQL's types. + +The framework provides a default implementation (as a fallback) that supports most of the common data types. + + *NOTE* : this API is considered experimental/beta and may change in the future. + +== API + +[source,java] +.TypeMapper.java +---- +interface TypeMapper { + GraphQLScalarType scalarTypeFor(Class<?> c) + GraphQLOutputType outputTypeFor(OneToOneFeature oneToOneFeature) + GraphQLOutputType outputTypeFor(ObjectSpecification objectSpecification) + GraphQLList listTypeForElementTypeOf(OneToManyAssociation oneToManyAssociation) + GraphQLList listTypeFor(ObjectSpecification elementType) + GraphQLInputType inputTypeFor(OneToOneFeature oneToOneFeature, InputContext inputContext) + GraphQLList inputTypeFor(OneToManyActionParameter oneToManyActionParameter, InputContext inputContextUnused) + Object adaptPojo(Object argumentValue, ObjectSpecification elementType) +} +---- + diff --git a/core/adoc/modules/_overview/pages/about.adoc b/core/adoc/modules/_overview/pages/about.adoc index 1b8ee5c3d5..d73e7c2ced 100644 --- a/core/adoc/modules/_overview/pages/about.adoc +++ b/core/adoc/modules/_overview/pages/about.adoc @@ -2568,8 +2568,16 @@ Directory: /viewers/graphql/applib ---- |.Dependencies **** -org.apache.causeway.core:causeway-applib:jar:<managed> + +com.graphql-java:graphql-java:jar:<managed> + org.apache.causeway.core:causeway-core-internaltestsupport:jar:<managed> + +org.apache.causeway.core:causeway-core-metamodel:jar:<managed> + +org.springframework.boot:spring-boot-autoconfigure:jar:<managed> + +org.springframework.graphql:spring-graphql:jar:<managed> + +**** + +.Document Index Entries +**** +xref:refguide:viewer:index/graphql/applib/auth/UserMementoProvider.adoc[UserMementoProvider], xref:refguide:viewer:index/graphql/applib/types/TypeMapper.adoc[TypeMapper] **** |Apache Causeway Viewer - GraphQL (Model)
