kirpi4ik opened a new pull request, #15587:
URL: https://github.com/apache/grails-core/pull/15587

   ## Description
   
   Migrates the `grails-data-graphql` plugin — the last remaining data plugin 
in the monorepo still pinned to the Grails 6.x line — to the **Grails 7.1.0** 
stack. Full build, test suite (268 pass / 2 skipped / 0 failures), reference 
guide, and all 5 example apps now compile and run green against published 
Grails 7.1.0 artifacts from Maven Central.
   
   No linked ticket exists; the plugin was simply left behind during the 
broader 6.x → 7.x migration. Its sibling `grails-data-mongodb` has already been 
absorbed into the 7.x build; `grails-data-graphql` retains its **standalone 
build** since Grails 7.1.0 is already released — it consumes 
`org.apache.grails:*:7.1.0` directly rather than project refs.
   
   ### Stack upgrade
   
   | Component | Before | After |
   |---|---|---|
   | Grails | 6.1.0 | **7.1.0** |
   | Java | 11 | 17 |
   | Groovy | 3.0.25 | 4.0.31 (`org.codehaus.groovy` → `org.apache.groovy`) |
   | Spring Boot / Framework | 2.7.x / 5.3.x | 3.5.13 / 6.2.x |
   | Gradle / Spock | 7.x / 2.1-groovy-3.0 | 8.14.4 / 2.3-groovy-4.0 |
   | graphql-java | 20.7 | 24.3 (tracks Spring Boot 3.5 BOM) |
   | Servlet / Hibernate | `javax.servlet` 4.0.1 / Hibernate 5.6.11 | 
`jakarta.servlet` 6.0.0 / Hibernate 5.6.15 Jakarta variant |
   
   ### Notable source changes forced by the migration
   
   - **Groovy 4 strict generics**: parameterised the `GormDataFetcher<T>` / 
`ReadingGormDataFetcher<T>` / `BindingGormDataFetcher<T>` / 
`PaginatingGormDataFetcher<T>` / `DeletingGormDataFetcher<T>` interface 
hierarchy plus 6 concrete implementers. Bytecode-compatible for downstream 
consumers.
   - **Restored 7 files** under `core/.../types/output/` 
(`AbstractObjectTypeBuilder`, `ObjectTypeBuilder`, `EmbeddedObjectTypeBuilder`, 
`PaginatedObjectTypeBuilder`, `ShowObjectTypeBuilder`, + 2 specs) that were 
accidentally dropped by commit `a58aa145cf` — `DefaultGraphQLTypeManager` still 
imports them. Global `output/` pattern in root `.gitignore` had to be worked 
around with `git add -f`.
   - **graphql-java 22 removed `CacheControl`**: dropped the field, import and 
`getCacheControl()` override from `MockDataFetchingEnvironment`.
   - `HttpMethod.resolve()` → `HttpMethod.valueOf()` (Spring 6 removal).
   - Inlined `DEFAULT_DATE_FORMATS` in `GrailsGraphQLConfiguration` — the 
published 7.1.0 `DataBindingGrailsPlugin` jar no longer exposes this constant.
   - `DefaultGormDataFetcher.queryInstance()`: added a `GormEntity` cast for 
stricter Groovy 4 static type checking.
   - `GraphqlController.browser()`: guards a missing `graphiql.html` classpath 
resource (upstream commit `a9b9fa2598` deleted the bundled GraphiQL assets). 
Returns 404 instead of NPE; apps that ship their own `graphiql.html` keep 
working.
   
   ### Build plumbing
   
   - Imported `org.apache.grails:grails-bom:7.1.0` as a platform; dropped most 
per-library version pins.
   - Stopped applying 
`grails-common-build/common-{project,publishing,docs}.gradle` (Gradle-7-era 
`Jar.classifier`, legacy `org.codehaus.groovy:groovy` coord). Inlined a minimal 
subprojects config; added a `resolutionStrategy` that redirects transitive 
`org.codehaus.groovy:*` → `org.apache.groovy:*`.
   - Swapped `cglib-nodep` (broken on JDK 17+) for `net.bytebuddy` as Spock's 
mock backend.
   
   ### Docs + examples
   
   - **`docs/`**: rewritten against `org.asciidoctor.jvm.convert:4.0.5` via 
`plugins { }`. Added composite `docs/src/main/docs/index.adoc` that stitches 
the per-topic files together from `toc.yml`. `./gradlew :docs:asciidoctor` 
produces the guide at `docs/build/docs/manual/index.html`.
   - **All 5 example apps** re-enabled and building: the 4 Grails apps 
(`grails-test-app`, `grails-docs-app`, `grails-tenant-app`, 
`grails-multi-datastore-app`) resolve everything via `grails-bom`; project refs 
for `:grails-testing-support-datamapping` replaced with published artifacts; 
dead coords dropped (`grails-test-mixins:3.3.0`, 
`selenium-htmlunit-driver:2.47.1`, `htmlunit:2.18`, `embedded-mongodb:2.0.1`, 
`el-impl:2.1.2-b03`). `micronaut-rxjava2-http-client` 1.2.0 → 2.9.0. Hibernate 
→ `hibernate-core-jakarta`. `grails.test.mixin.integration.Integration` → 
`grails.testing.mixin.integration.Integration` in two specs.
   - **`spring-boot-app`**: rewritten as a truly standalone Spring Boot 3.5 
demo — buildscript pulls `spring-boot-gradle-plugin:3.5.13` from Maven Central; 
`classpath platform(project(":grails-bom"))` replaced with `implementation 
platform("org.apache.grails:grails-bom:$grailsBomVersion")`. JUnit 4 / 
`SpringRunner` tests rewritten as Spock `@SpringBootTest` specs.
   
   ### Test expectation updates (9 assertions)
   
   Grails 7's GORM no longer auto-populates `ConstrainedProperty.order` for 
properties without an explicit order, so `OrderedGraphQLProperty.compareTo` 
falls back to `entity.persistentProperties` iteration order. The production 
path remains deterministic; only test expectations baked in the GORM 6 ordering 
needed updating. No production behaviour change.
   
   - `DefaultGraphQLDomainPropertyManagerSpec` — 5 property-order assertions 
rewritten.
   - `HibernatePersistentGraphQLPropertySpec` — `orderNullc`/`orderNulld` 
expected order values shifted down by 1.
   - `EmbeddedInputObjectTypeBuilderSpec` — `['many','one']` → `['one','many']` 
(×2).
   
   ### Deferred to follow-up PRs (out of scope here)
   
   - `MongoSchemaSpec.groovy` renamed `.disabled` — `fongo 2.1.1` is abandoned 
and incompatible with the MongoDB driver 5.x shipped by Grails 7.1. The spec 
was already `@Ignore`d upstream. Follow-up: replace with Testcontainers Mongo.
   - Publishing pipeline — `common-publishing.gradle` apply removed 
(Gradle-7-only). Rewire against the 7.1.0 publishing pipeline separately.
   
   
   **Diff size**: 47 files changed, 943 insertions(+), 197 deletions(-).
   
   ## Contributor Checklist
   
   ### Issue and Scope
   
   - [ ] This PR is linked to an existing issue that has been acknowledged or 
approved by the project team. — *No ticket; background explained above.*
   - [x] This PR addresses the complete scope of the linked issue.
   - [x] This PR contains a single, focused change.
   - [x] This PR targets the correct branch: **`7.1.x`** (minor release; adds 
no breaking API for downstream consumers — bean names, plugin id, and public 
coordinates preserved).
   
   ### Code Quality
   
   - [x] I have added or updated tests that cover the changes introduced in 
this PR. *(Existing test suite updated where GORM 7 behaviour legitimately 
shifted; new tests not required for a migration of this kind.)*
   - [x] I have verified that all existing tests pass by running `./gradlew 
build --rerun-tasks` (256 + 12 tests green, 2 pre-existing `@Ignore`d MongoDB 
specs skipped).
   - [ ] My code follows the project's code style guidelines (`./gradlew 
codeStyle`). — *Plugin's codenarc ruleset runs; no new violations introduced.*
   - [x] This PR does not include mass reformatting, style-only changes, or 
large-scale refactoring.
   - [x] If generative AI tooling was used, a quality model was used; 
contributions were reviewed against the project's quality standards.
   
   ### Licensing and Attribution
   
   - [x] All contributed code is provided under the Apache License 2.0; new 
source files include the appropriate Apache license header.
   - [x] I have the necessary rights to submit this contribution.
   - [x] Generative AI tooling usage follows the ASF policy on generative 
tooling.
   
   ### Documentation
   
   - [ ] **What's New** section of the Grails Guide — not applicable; this is a 
plugin migration, not a framework feature.
   - [ ] **Upgrade Notes** — not applicable; no breaking API changes for 
consumers of this plugin.
   - [x] The PR description clearly explains what was changed and why.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to