Title: validate non-nullable directive args by jbellenger · Pull Request #3551 · graphql-java/graphql-java · GitHub
Open Graph Title: validate non-nullable directive args by jbellenger · Pull Request #3551 · graphql-java/graphql-java
X Title: validate non-nullable directive args by jbellenger · Pull Request #3551 · graphql-java/graphql-java
Description: In putting together a fuzz tester for graphql-java schemas, I noticed that applied directives were not failing when they were missing values for non-nullable arguments. I put together a fix and a test case. This test case fails against master and passes with the changes to AppliedDirectiveArgumentsAreValid. I'm unsure about a couple of things in this PR and am open to feedback: GraphQLDirective.toAppliedDirective() makes it easy to forget to provide directive argument values, and I didn't see a straight-forward way to go from a GraphQLDirective -> GraphQLAppliedDirective with input values. Am I misunderstanding how this is supposed to be used? AppliedDirectiveArgumentsAreValid used to exit early if no input value was set. I think that was an implicit (and incorrect?) assumption that a applied directive arg always had a default value or was nullable, though I'm not sure. Is this right?
Open Graph Description: In putting together a fuzz tester for graphql-java schemas, I noticed that applied directives were not failing when they were missing values for non-nullable arguments. I put together a fix and a t...
X Description: In putting together a fuzz tester for graphql-java schemas, I noticed that applied directives were not failing when they were missing values for non-nullable arguments. I put together a fix and a t...
Opengraph URL: https://github.com/graphql-java/graphql-java/pull/3551
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:854a3f82-b66a-6c45-6f46-ae17d7b84604 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 8E94:1F542C:1274D93:18E2090:6A606C52 |
| html-safe-nonce | c38c8587e5c29f2545ded696bf110bf370b96e59f01f6e03ca55c4efc099ed88 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RTk0OjFGNTQyQzoxMjc0RDkzOjE4RTIwOTA6NkE2MDZDNTIiLCJ2aXNpdG9yX2lkIjoiODY5NzI5MjE0NjA3MTMzMzk3MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 989385f7ff72e7b92b687f3c80123af182478bef2fa3fcd3df60f0e22f7ac8a5 |
| hovercard-subject-tag | pull_request:1799480520 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/graphql-java/graphql-java/pull/3551/files |
| twitter:image | https://avatars.githubusercontent.com/u/1391805?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/1391805?s=400&v=4 |
| og:image:alt | In putting together a fuzz tester for graphql-java schemas, I noticed that applied directives were not failing when they were missing values for non-nullable arguments. I put together a fix and a t... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 60da8c2a42fa2bbf5f7567474990ec467836a84444262a58e200fa91b7f3d2d0 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9824515e740d83d5eb82168a089b806ab0fe04a1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width