Title: Inline fragments don't work on fields declared with interface types (v16.2) · Issue #2336 · graphql-java/graphql-java · GitHub
Open Graph Title: Inline fragments don't work on fields declared with interface types (v16.2) · Issue #2336 · graphql-java/graphql-java
X Title: Inline fragments don't work on fields declared with interface types (v16.2) · Issue #2336 · graphql-java/graphql-java
Description: Description Specifying an inline fragment for a concrete (sub)type of a field declared with that same type seems to work. However, field fetchers aren't even called when the same is done for a field declared using an interface type, whet...
Open Graph Description: Description Specifying an inline fragment for a concrete (sub)type of a field declared with that same type seems to work. However, field fetchers aren't even called when the same is done for a fiel...
X Description: Description Specifying an inline fragment for a concrete (sub)type of a field declared with that same type seems to work. However, field fetchers aren't even called when the same is done for a ...
Opengraph URL: https://github.com/graphql-java/graphql-java/issues/2336
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Inline fragments don't work on fields declared with interface types (v16.2)","articleBody":"**Description**\r\nSpecifying an inline fragment for a concrete (sub)type of a field declared with that same type seems to work. However, field fetchers aren't even called when the same is done for a field declared using an interface type, whether that declared interface type, concrete object type or any other type in between is used.\r\n\r\nFor more details see:\r\nhttps://github.com/graphql-java/graphql-java/discussions/2331\r\n\r\n**To Reproduce**\r\nCreate a schema as follows:\r\n```GraphQL\r\ninterface Base {\r\n id: ID\r\n}\r\n\r\ntype Concrete implements Base {\r\n id: ID\r\n name: String\r\n}\r\n\r\ntype Test {\r\n base: Base\r\n concrete: Concrete\r\n}\r\n\r\ntype Query {\r\n test: Test\r\n} \r\n```\r\n\r\nSet it up so that you can return/fetch some data. Perhaps return the exact same object/instance for both `base` and `concrete` fields of `Test` to make it more interesting (both need to be of type `Concrete` anyway). Issue the following query:\r\n\r\n```GraphQL\r\nquery {\r\n test {\r\n base {\r\n __typename\r\n ... on Base {\r\n id\r\n }\r\n ... on Concrete {\r\n name\r\n }\r\n }\r\n concrete {\r\n __typename\r\n ... on Concrete {\r\n id\r\n name\r\n }\r\n }\r\n }\r\n}\r\n```\r\n\r\nFields `base` and `concrete` should include exactly the same sub-fields: `__typename`, `id` and `name`. They do not.\r\n","author":{"url":"https://github.com/aleksandarsusnjar","@type":"Person","name":"aleksandarsusnjar"},"datePublished":"2021-05-13T20:14:04Z","url":"https://github.com/graphql-java/graphql-java/issues/2336"}
| 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:62bc83e7-fb27-6f05-7693-90ab1fe15ee6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8032:157C65:2508E6A:3175521:6B01A35D |
| html-safe-nonce | 18aa6ce4dd37f906c1ea974148b84decefc673b036dafad18a28144492940f72 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MDMyOjE1N0M2NToyNTA4RTZBOjMxNzU1MjE6NkIwMUEzNUQiLCJ2aXNpdG9yX2lkIjoiMzc5MDgyMzMwNjQ0NjM0OTE0OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f388259ce1c8feb89a950aeb3eec6f0f220bb04197707c3f647cabd896d34778 |
| hovercard-subject-tag | issue:891337896 |
| 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/2336/issue_layout |
| twitter:image | https://opengraph.githubassets.com/dffaf6935acd632da12c44ee55d5505e8f03b3ca280046b636fb03edf079f47f/graphql-java/graphql-java/issues/2336 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/dffaf6935acd632da12c44ee55d5505e8f03b3ca280046b636fb03edf079f47f/graphql-java/graphql-java/issues/2336 |
| og:image:alt | Description Specifying an inline fragment for a concrete (sub)type of a field declared with that same type seems to work. However, field fetchers aren't even called when the same is done for a fiel... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | aleksandarsusnjar |
| 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