Title: SDL scalar descriptions are not available for introspection · Issue #2410 · graphql-java/graphql-java · GitHub
Open Graph Title: SDL scalar descriptions are not available for introspection · Issue #2410 · graphql-java/graphql-java
X Title: SDL scalar descriptions are not available for introspection · Issue #2410 · graphql-java/graphql-java
Description: Describe the bug Scalar descriptions are not correctly included into a GraphQLSchema from a TypeDefinitionRegistry parsed from an SDL string. GraphQLScalarType's definition field remains as null, while strangely, the description on Graph...
Open Graph Description: Describe the bug Scalar descriptions are not correctly included into a GraphQLSchema from a TypeDefinitionRegistry parsed from an SDL string. GraphQLScalarType's definition field remains as null, w...
X Description: Describe the bug Scalar descriptions are not correctly included into a GraphQLSchema from a TypeDefinitionRegistry parsed from an SDL string. GraphQLScalarType's definition field remains as nul...
Opengraph URL: https://github.com/graphql-java/graphql-java/issues/2410
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"SDL scalar descriptions are not available for introspection","articleBody":"**Describe the bug**\r\n\r\nScalar descriptions are not correctly included into a `GraphQLSchema` from a `TypeDefinitionRegistry` parsed from an SDL string. \r\n\r\n`GraphQLScalarType`'s definition field remains as `null`, while strangely, the description on `GraphQLScalarType.definition` includes the correct value.\r\n\r\nThis is important, as for users who load their schema from graphql SDL files, rather than building it with the builders, the descriptions never make it through to introspection.\r\n\r\n**To Reproduce**\r\n\r\nUsing GraphQL-Java version 16.2\r\n\r\n```java\r\n final String schemaSDL = \"\"\r\n + \"\\\"\\\"\\\"\\n\"\r\n + \"2-digit integer e.g. January is 01\\n\"\r\n + \"\\\"\\\"\\\"\\n\"\r\n + \"scalar Month\\n\"\r\n + \"\\n\"\r\n + \"type Query {\\n\"\r\n + \" currentMonth: Month\\n\"\r\n + \"}\\n\";\r\n\r\nfinal TypeDefinitionRegistry tdr = new SchemaParser().parse(schemaSDL);\r\nfinal GraphQLSchema schema = new SchemaGenerator().makeExecutableSchema(tdr, RuntimeWiring.newRuntimeWiring().scalar(\r\n GraphQLScalarType.newScalar().name(\"Month\").coercing(new GraphqlStringCoercing()).build()).build());\r\nfinal GraphQLScalarType scalar = (GraphQLScalarType) schema.getType(\"Month\");\r\n\r\nassertEquals(\"2-digit integer e.g. January is 01\", scalar.getDefinition().getDescription().getContent()); // Passes\r\nassertEquals(\"2-digit integer e.g. January is 01\", scalar.getDescription()); // Fails\r\n```\r\n\r\n","author":{"url":"https://github.com/WMendelsohn","@type":"Person","name":"WMendelsohn"},"datePublished":"2021-06-29T08:42:11.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/2410/graphql-java/issues/2410"}
| 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:837f1efe-b64b-b73c-20b4-be836a1a82da |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C0B2:357B25:2D5E92E:41A3B95:6A60DD19 |
| html-safe-nonce | b01042815ba87152fe639418076fe5a4e575d761c0016fba4efda3effe8258e6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMEIyOjM1N0IyNToyRDVFOTJFOjQxQTNCOTU6NkE2MEREMTkiLCJ2aXNpdG9yX2lkIjoiNzQwOTc1MjUyMzcyODI4MDg1NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | a33f252ea944627839ac2d55ffc44b44faf5635f8440986bb515688a4bafd447 |
| hovercard-subject-tag | issue:932374271 |
| 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/2410/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5b6ba8571eb0dfff9a1a845f595d59f2ad392f5eb8f503ffd2280a7e6d8a1bdc/graphql-java/graphql-java/issues/2410 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5b6ba8571eb0dfff9a1a845f595d59f2ad392f5eb8f503ffd2280a7e6d8a1bdc/graphql-java/graphql-java/issues/2410 |
| og:image:alt | Describe the bug Scalar descriptions are not correctly included into a GraphQLSchema from a TypeDefinitionRegistry parsed from an SDL string. GraphQLScalarType's definition field remains as null, w... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | WMendelsohn |
| hostname | github.com |
| expected-hostname | github.com |
| None | 8302bdfafed4cf34ac9c1d3593108fafa53bc3f86b893907e38fa6bdd74361ac |
| 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 | c3c2ff0c76b34772c83c9498a08cefee28f53da0 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width