Title: Nested inputobject in mutation input cannot be optional · Issue #72 · graphql-java/graphql-java · GitHub
Open Graph Title: Nested inputobject in mutation input cannot be optional · Issue #72 · graphql-java/graphql-java
X Title: Nested inputobject in mutation input cannot be optional · Issue #72 · graphql-java/graphql-java
Description: Suppose you do a relay-like mutation, with input object AddFriend as input object type. This input object type contains another List of nested input object types which is optional. The schema is more or less like follows: { "kind": "INPU...
Open Graph Description: Suppose you do a relay-like mutation, with input object AddFriend as input object type. This input object type contains another List of nested input object types which is optional. The schema is mo...
X Description: Suppose you do a relay-like mutation, with input object AddFriend as input object type. This input object type contains another List of nested input object types which is optional. The schema is mo...
Opengraph URL: https://github.com/graphql-java/graphql-java/issues/72
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Nested inputobject in mutation input cannot be optional","articleBody":"Suppose you do a relay-like mutation, with input object AddFriend as input object type. This input object type contains another List of nested input object types which is optional. The schema is more or less like follows:\n\n```\n{\n \"kind\": \"INPUT_OBJECT\",\n \"name\": \"AddFriend\",\n \"description\": null,\n \"fields\": null,\n \"inputFields\": [\n {\n \"name\": \"clientMutationId\",\n \"description\": null,\n \"type\": {\n \"kind\": \"SCALAR\",\n \"name\": \"String\",\n \"ofType\": null\n },\n \"defaultValue\": null\n },\n {\n \"name\": \"sharingRules\",\n \"description\": null,\n \"type\": {\n \"kind\": \"LIST\",\n \"name\": null,\n \"ofType\": {\n \"kind\": \"INPUT_OBJECT\",\n \"name\": \"AddSharingRule\",\n \"ofType\": null\n }\n },\n \"defaultValue\": null\n }\n ],\n \"interfaces\": null,\n \"enumValues\": null,\n \"possibleTypes\": null\n }\n```\n\nIf you send a mutation without any Sharing rule, you get a nullpointer with the followinng stacktrace:\n\n```\njava.lang.NullPointerException\n at graphql.execution.ValuesResolver.coerceValueForInputObjectField(ValuesResolver.java:84)\n at graphql.execution.ValuesResolver.coerceValue(ValuesResolver.java:74)\n at graphql.execution.ValuesResolver.coerceValueForList(ValuesResolver.java:107)\n at graphql.execution.ValuesResolver.coerceValue(ValuesResolver.java:72)\n at graphql.execution.ValuesResolver.coerceValueForInputObjectField(ValuesResolver.java:84)\n at graphql.execution.ValuesResolver.coerceValue(ValuesResolver.java:74)\n at graphql.execution.ValuesResolver.getVariableValue(ValuesResolver.java:59)\n at graphql.execution.ValuesResolver.getVariableValues(ValuesResolver.java:16)\n at graphql.execution.ExecutionContextBuilder.build(ExecutionContextBuilder.java:55)\n at graphql.execution.Execution.execute(Execution.java:32)\n at graphql.GraphQL.execute(GraphQL.java:78)\n at graphql.GraphQL.execute(GraphQL.java:55)\n```\n","author":{"url":"https://github.com/kristofdepypere","@type":"Person","name":"kristofdepypere"},"datePublished":"2016-01-25T08:23:02.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/72/graphql-java/issues/72"}
| 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:1bb288e5-88b3-6ec5-679c-d3532ecc169a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8002:249564:2E37C4A:4004BCB:6A60CA92 |
| html-safe-nonce | cf465d5118c608d8170215c460e278baa2cb73406ca07ec764b3f3315de0b115 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MDAyOjI0OTU2NDoyRTM3QzRBOjQwMDRCQ0I6NkE2MENBOTIiLCJ2aXNpdG9yX2lkIjoiMzM0MDg1NTYzNzQyMTY0MDMzOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 4b820d1eda764c0acb9f09b20c23d87c9082455186a8f21b3080c440736b100d |
| hovercard-subject-tag | issue:128485742 |
| 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/72/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5996411988597c3f6df2955c276a3ac9548259c42ab33134e63ad9d2d1f7b4ab/graphql-java/graphql-java/issues/72 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5996411988597c3f6df2955c276a3ac9548259c42ab33134e63ad9d2d1f7b4ab/graphql-java/graphql-java/issues/72 |
| og:image:alt | Suppose you do a relay-like mutation, with input object AddFriend as input object type. This input object type contains another List of nested input object types which is optional. The schema is mo... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | kristofdepypere |
| hostname | github.com |
| expected-hostname | github.com |
| None | a9556c67fd2e63f5fecafc192915a3b089ef8170a9384ff6b59d7b4a2f6b73f8 |
| 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 | f464e59c3a800187a50f3c89c36ee16df9992c1b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width