Title: Failed validation for alias clashing with another field · Issue #3332 · graphql-java/graphql-java · GitHub
Open Graph Title: Failed validation for alias clashing with another field · Issue #3332 · graphql-java/graphql-java
X Title: Failed validation for alias clashing with another field · Issue #3332 · graphql-java/graphql-java
Description: The following test fails: @Test fun test() { val schemaString = """ type Query { cat: Cat! } type Cat { foo1: String! foo2: String! } """.trimIndent() val documentString = """ query GetCat { cat { foo1 foo1: foo2 } } """.trimIndent() val...
Open Graph Description: The following test fails: @Test fun test() { val schemaString = """ type Query { cat: Cat! } type Cat { foo1: String! foo2: String! } """.trimIndent() val documentString = """ query GetCat { cat { ...
X Description: The following test fails: @Test fun test() { val schemaString = """ type Query { cat: Cat! } type Cat { foo1: String! foo2: String! } """.trimIndent() val documentStri...
Opengraph URL: https://github.com/graphql-java/graphql-java/issues/3332
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Failed validation for alias clashing with another field","articleBody":"The following test fails:\r\n\r\n```kotlin\r\n @Test\r\n fun test() {\r\n val schemaString = \"\"\"\r\n type Query {\r\n cat: Cat!\r\n }\r\n \r\n type Cat {\r\n foo1: String!\r\n foo2: String!\r\n }\r\n \"\"\".trimIndent()\r\n\r\n val documentString = \"\"\"\r\n query GetCat {\r\n cat {\r\n foo1\r\n foo1: foo2\r\n }\r\n }\r\n\r\n \"\"\".trimIndent()\r\n val typeDefinitionRegistry = SchemaParser().parse(schemaString)\r\n val document = Parser().parseDocument(documentString)\r\n val graphQLSchema = SchemaGenerator().makeExecutableSchema(typeDefinitionRegistry, RuntimeWiring.newRuntimeWiring().build())\r\n val result = Validator().validateDocument(graphQLSchema, document, Locale.US)\r\n\r\n // There should be a validation error at this point.\r\n check(result.isNotEmpty())\r\n }\r\n```\r\n\r\nI would expect a validation error because `foo1` and `foo1: foo2` cannot be merged.\r\n\r\nEdit: this is on version `21.1`","author":{"url":"https://github.com/martinbonnin","@type":"Person","name":"martinbonnin"},"datePublished":"2023-09-18T13:02:14.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":9},"url":"https://github.com/3332/graphql-java/issues/3332"}
| 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:459ad6ac-453e-d41f-e7f8-52819f8c430a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DFD4:3BA98A:188D179:233D30F:6A608D3E |
| html-safe-nonce | 26a85c52e6770bbb5021a472b0cae32f0eae9edf67a877cb75bd239eb6454e55 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERkQ0OjNCQTk4QToxODhEMTc5OjIzM0QzMEY6NkE2MDhEM0UiLCJ2aXNpdG9yX2lkIjoiNTA3ODk3MDM3ODg4ODQ0OTM0MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 561c1ba9b73796f594ccdb8df4f4fd93482065ec2be1f30f851e62482aa032ec |
| hovercard-subject-tag | issue:1900890616 |
| 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/3332/issue_layout |
| twitter:image | https://opengraph.githubassets.com/76ef44a7da163ee7445c02c7e35c69b6ae468791b5f396475a85058c77319483/graphql-java/graphql-java/issues/3332 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/76ef44a7da163ee7445c02c7e35c69b6ae468791b5f396475a85058c77319483/graphql-java/graphql-java/issues/3332 |
| og:image:alt | The following test fails: @Test fun test() { val schemaString = """ type Query { cat: Cat! } type Cat { foo1: String! foo2: String! } """.trimIndent() val documentString = """ query GetCat { cat { ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | martinbonnin |
| hostname | github.com |
| expected-hostname | github.com |
| None | c0632c7929f76e8db538ffed06ab2fc4c524a012b0888e95d96928690fcc604d |
| 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 | 4f9009410bd92637ba907f71dc7f7af3f0df45aa |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width