Title: `LightDataFetcher` implementation not getting executed as intended · Issue #3650 · graphql-java/graphql-java · GitHub
Open Graph Title: `LightDataFetcher` implementation not getting executed as intended · Issue #3650 · graphql-java/graphql-java
X Title: `LightDataFetcher` implementation not getting executed as intended · Issue #3650 · graphql-java/graphql-java
Description: Describe the bug This condition in ExecutionStrategy:invokeDataFetcher(): if (dataFetcher instanceof LightDataFetcher) { is evaluating to False even if the dataFetcher is actually created by implementing LightDataFetcher interface. I hav...
Open Graph Description: Describe the bug This condition in ExecutionStrategy:invokeDataFetcher(): if (dataFetcher instanceof LightDataFetcher) { is evaluating to False even if the dataFetcher is actually created by implem...
X Description: Describe the bug This condition in ExecutionStrategy:invokeDataFetcher(): if (dataFetcher instanceof LightDataFetcher) { is evaluating to False even if the dataFetcher is actually created by implem...
Opengraph URL: https://github.com/graphql-java/graphql-java/issues/3650
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`LightDataFetcher` implementation not getting executed as intended","articleBody":"**Describe the bug**\r\nThis condition in [`ExecutionStrategy:invokeDataFetcher()`](https://github.com/graphql-java/graphql-java/blob/99ec59623c87f62fc24ac780b6fc47fad39017e9/src/main/java/graphql/execution/ExecutionStrategy.java#L530): \r\n```java\r\nif (dataFetcher instanceof LightDataFetcher) {\r\n```\r\n is evaluating to `False` even if the `dataFetcher` is actually created by implementing `LightDataFetcher` interface.\r\n\r\nI have tried to debug why it is so, and I found this object being passed as datafetcher to the `invokeDataFetcher` function which is being evaluated as not a `LightDataFetcher`:\r\n\r\n\r\n**Context**\r\nI am creating a `LightOperationExecutor` as a lightweight alternative to `OperationExecutor` in [GraphQL-SPQR](https://github.com/leangen/graphql-spqr/) by implementing `LightDataFetcher`. Open PR [#502](https://github.com/leangen/graphql-spqr/pull/502)\r\n\r\n**To Reproduce**\r\nTo reproduce, checkout commit [05642488bc](https://github.com/leangen/graphql-spqr/pull/502/commits/05642488bc8809073dfba239b5189106998f5473) and run `test` in Maven. You should see the tests `SchemaTest.testSchema` and `RelayTest.testRelayMutations` produce errors. \r\n\r\nNote that even though the commit uses GraphQL-Java `21.3`, this is also reproducible on `22.1` (latest), however in this situation we have this datafetcher object, \r\n\u003cimg width=\"623\" alt=\"image\" src=\"https://github.com/graphql-java/graphql-java/assets/78898665/ad0a8e04-49a3-4c93-bba9-6725c4a4ec19\">\r\n\r\n","author":{"url":"https://github.com/shalearkane","@type":"Person","name":"shalearkane"},"datePublished":"2024-06-28T09:34:51Z","url":"https://github.com/graphql-java/graphql-java/issues/3650"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:160a52b9-691b-3da1-fa3e-46e4609026c9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A9C4:34CAB:200D929:28EB596:6B017652 |
| html-safe-nonce | 455a17bbf19b2fcb78ede12d14d390df16045fa8fb7d919f00acf953e6708f88 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOUM0OjM0Q0FCOjIwMEQ5Mjk6MjhFQjU5Njo2QjAxNzY1MiIsInZpc2l0b3JfaWQiOiI1ODc4MDYwMjExMjM0NzY0MzcwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | fb37640200dedd181e1715b8fbea774988636877de0b352739d7c15f28d80b49 |
| hovercard-subject-tag | issue:2380009458 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/graphql-java/graphql-java/3650/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e4666adb581530f520ea7e1910d2b7c947a911a2cf685e180f62e9fab4df80b4/graphql-java/graphql-java/issues/3650 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e4666adb581530f520ea7e1910d2b7c947a911a2cf685e180f62e9fab4df80b4/graphql-java/graphql-java/issues/3650 |
| og:image:alt | Describe the bug This condition in ExecutionStrategy:invokeDataFetcher(): if (dataFetcher instanceof LightDataFetcher) { is evaluating to False even if the dataFetcher is actually created by implem... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | shalearkane |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/graphql-java/graphql-java git https://github.com/graphql-java/graphql-java.git |
| octolytics-dimension-user_id | 14289921 |
| octolytics-dimension-user_login | graphql-java |
| octolytics-dimension-repository_id | 38602457 |
| octolytics-dimension-repository_nwo | graphql-java/graphql-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 38602457 |
| octolytics-dimension-repository_network_root_nwo | graphql-java/graphql-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width