Title: SchemaUsageReport is not visiting applied directives · Issue #3267 · graphql-java/graphql-java · GitHub
Open Graph Title: SchemaUsageReport is not visiting applied directives · Issue #3267 · graphql-java/graphql-java
X Title: SchemaUsageReport is not visiting applied directives · Issue #3267 · graphql-java/graphql-java
Description: Describe the bug SchemaUsageReport is not visiting GraphQLAppliedDirectives, this can sometimes result in SchemaUsage giving incorrect information about whether a directive is being referenced. To Reproduce create a schema that contains ...
Open Graph Description: Describe the bug SchemaUsageReport is not visiting GraphQLAppliedDirectives, this can sometimes result in SchemaUsage giving incorrect information about whether a directive is being referenced. To ...
X Description: Describe the bug SchemaUsageReport is not visiting GraphQLAppliedDirectives, this can sometimes result in SchemaUsage giving incorrect information about whether a directive is being referenced. To ...
Opengraph URL: https://github.com/graphql-java/graphql-java/issues/3267
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"SchemaUsageReport is not visiting applied directives","articleBody":"**Describe the bug**\r\nSchemaUsageReport is not visiting GraphQLAppliedDirectives, this can sometimes result in SchemaUsage giving incorrect information about whether a directive is being referenced.\r\n\r\n**To Reproduce**\r\n- create a schema that contains a directive definition and a field that uses that directive\r\n- manipulate the schema, clearing the list of directives from the field, and adding the applied directive back to it.\r\nFor example:\r\n```\r\nList\u003cGraphQLAppliedDirectives\u003e directives = fieldDef.getAppliedDirectives();\r\nfieldDef.transform(f -\u003e f.clearDirectives().replaceAppliedDirectives(directives))\r\n```\r\n- at this point the field should have an empty list of GraphQLDirective, and a list of GraphQLAppliedDirective containing 1 item\r\n- run the schema through SchemaUsage and check if the directive is being referenced:\r\n```\r\nschemaUsage.isStronglyReferenced(schema, \"directiveName\")\r\n```\r\n\r\n\r\nexpected behaviour: `isStronglyReferenced` should return `true`, since the directive is applied to the field\r\nactual behaviour: `isStronglyReferenced` returns `false`","author":{"url":"https://github.com/felipe-gdr","@type":"Person","name":"felipe-gdr"},"datePublished":"2023-07-11T07:33:29.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/3267/graphql-java/issues/3267"}
| 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:e73e404f-27fd-db17-d2a4-fe1129a6579a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B2A8:3AE42:A17CA7:D1679D:6A600929 |
| html-safe-nonce | c3a321c32c58956fe4c4125ce11565c09da8ee95dd012763c9ade98823d00532 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMkE4OjNBRTQyOkExN0NBNzpEMTY3OUQ6NkE2MDA5MjkiLCJ2aXNpdG9yX2lkIjoiNzY5MDEwMzA5ODM1Nzg2NTM3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | ce721a934c1c2c3e4a0139da44b2da9db521d1c662a3317d7f155a20b34163dd |
| hovercard-subject-tag | issue:1798309049 |
| 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/3267/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b92421eb7894c93d6f19b3ef404470bfd44e4f5642e8d36b745af3c71862b191/graphql-java/graphql-java/issues/3267 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b92421eb7894c93d6f19b3ef404470bfd44e4f5642e8d36b745af3c71862b191/graphql-java/graphql-java/issues/3267 |
| og:image:alt | Describe the bug SchemaUsageReport is not visiting GraphQLAppliedDirectives, this can sometimes result in SchemaUsage giving incorrect information about whether a directive is being referenced. To ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | felipe-gdr |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5789899e92b20db289de946d86eb20bf5c9626276695d68f58a8c47cdda699b7 |
| 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 | 6ddc048ddf80664b9b33547b619db10313c482f1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width