You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@grails.apache.org by "borinquenkid (via GitHub)" <gi...@apache.org> on 2026/08/23 16:05:31 UTC

[PR] refactor(grails-data-graphql): clean up the fetcher package [grails-core]

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

   ## Summary
   Stacked on #16201. Fixes a series of IntelliJ-flagged issues in `org.grails.gorm.graphql.fetcher.*`:
   - `DeleteEntityDataFetcher`/`EntityDataFetcher`: simplified branch-per-response construction and added a missing `(T)` cast on `executeQuery`'s `DetachedCriteria#list` result, matching the cast convention every sibling fetcher already uses.
   - `CustomInterceptorInvoker`/`ProvidedInterceptorInvoker`: deduplicated an identical 9-line "resolve name → invoke → log if prevented → return" fragment into a shared `logIfPrevented` method on `InterceptorInvoker`.
   - `InterceptorInvoker`: replaced deprecated `DataFetchingEnvironment#getFields()` with `getMergedField()`.
   - `DefaultGormDataFetcher`: fixed a type mismatch (`Map<String, Association>` → `Map<String, Association<?>>`... with a documented reason it can't be fully parameterized under Groovy's static type checker), dropped an unused constructor parameter, and extracted `resolveDatastore()` to eliminate an ambiguous "might not be assigned" local variable.
   
   ## Test plan
   - [x] `./gradlew :grails-data-graphql-core:test :grails-data-graphql:test :grails-data-graphql-core:codeStyle :grails-data-graphql:codeStyle` passes
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
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: notifications-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] refactor(grails-data-graphql): clean up the fetcher package [grails-core]

Posted by "jdaugherty (via GitHub)" <gi...@apache.org>.
jdaugherty commented on PR #16203:
URL: https://github.com/apache/grails-core/pull/16203#issuecomment-5913668659

   Rebased onto `8.1.x` (the #16201 commit was already merged, so it was dropped) and dropped the commit **"Simplify DeleteEntityDataFetcher.get() to build the response per branch"**.
   
   Moving `createResponse` inside the `try` changed behavior: if the (user-replaceable) `GraphQLDeleteResponseHandler` throws while building the success response, the fetcher now catches that and returns `createResponse(env, false, e)`, so the client is told the delete failed even though the row has already been removed. Previously the handler exception propagated as a GraphQL field error. Verified with a probe spec using a handler that throws on the success path: 8.1.x → exception propagates; PR head → `[success: false, error: ...]` with zero rows left.
   
   The original structure is kept and a comment now documents why the response must be built outside the `try`. The remaining fetcher/interceptor commits are unchanged. `:grails-data-graphql-core:test` and `codeStyle` pass on the new head.


-- 
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: notifications-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] refactor(grails-data-graphql): clean up the fetcher package [grails-core]

Posted by "testlens-app[bot] (via GitHub)" <gi...@apache.org>.
testlens-app[bot] commented on PR #16203:
URL: https://github.com/apache/grails-core/pull/16203#issuecomment-5387529186

   ## ✅ All tests passed ✅
   
   🏷️ Commit: 2865d10ea1bc42ba721fb6e72c378d4a008cc0d7
   ▶️ Tests:  47646 executed
   ⚪️ Checks: 70/70 completed
   
   ---
   _Learn more about TestLens at [testlens.app/docs](https://testlens.app/docs/features/pr-comment/)._
   


-- 
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: notifications-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] refactor(grails-data-graphql): clean up the fetcher package [grails-core]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #16203:
URL: https://github.com/apache/grails-core/pull/16203#issuecomment-5387174442

   ## [Codecov](https://app.codecov.io/gh/apache/grails-core/pull/16203?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :warning: Please [upload](https://docs.codecov.com/docs/codecov-uploader) report for BASE (`test/grails-data-graphql-coverage@36b7716`). [Learn more](https://docs.codecov.io/docs/error-reference?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#section-missing-base-commit) about missing BASE report.
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   [![Impacted file tree graph](https://app.codecov.io/gh/apache/grails-core/pull/16203/graphs/tree.svg?width=650&height=150&src=pr&token=qJrryhpk7u&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)](https://app.codecov.io/gh/apache/grails-core/pull/16203?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   ```diff
   @@                          Coverage Diff                           @@
   ##             test/grails-data-graphql-coverage     #16203   +/-   ##
   ======================================================================
     Coverage                                     ?   53.4199%           
     Complexity                                   ?      19462           
   ======================================================================
     Files                                        ?       2081           
     Lines                                        ?      98993           
     Branches                                     ?      17361           
   ======================================================================
     Hits                                         ?      52882           
     Misses                                       ?      38563           
     Partials                                     ?       7548           
   ```
   </details>
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
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: notifications-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] refactor(grails-data-graphql): clean up the fetcher package [grails-core]

Posted by "jdaugherty (via GitHub)" <gi...@apache.org>.
jdaugherty merged PR #16203:
URL: https://github.com/apache/grails-core/pull/16203


-- 
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: notifications-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org