René's URL Explorer Experiment


Title: Exceptions not working as expected with Directive Wiring · Issue #79 · graphql-java/graphql-java-extended-validation · GitHub

Open Graph Title: Exceptions not working as expected with Directive Wiring · Issue #79 · graphql-java/graphql-java-extended-validation

X Title: Exceptions not working as expected with Directive Wiring · Issue #79 · graphql-java/graphql-java-extended-validation

Description: Describe the bug I'm trying to connect kotlin, spring for graphql, and the validation feature, but when I add the directive wiring, the exceptions thrown in the service layer are not being displayed correctly. Config: @Configuration clas...

Open Graph Description: Describe the bug I'm trying to connect kotlin, spring for graphql, and the validation feature, but when I add the directive wiring, the exceptions thrown in the service layer are not being displaye...

X Description: Describe the bug I'm trying to connect kotlin, spring for graphql, and the validation feature, but when I add the directive wiring, the exceptions thrown in the service layer are not being disp...

Opengraph URL: https://github.com/graphql-java/graphql-java-extended-validation/issues/79

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Exceptions not working as expected with Directive Wiring","articleBody":"**Describe the bug**\r\n\r\nI'm trying to connect kotlin, spring for graphql, and the validation feature, but when I add the directive wiring, the exceptions thrown in the service layer are not being displayed correctly.\r\n\r\nConfig:\r\n```\r\n@Configuration\r\nclass GraphQLConfig {\r\n\r\n    @Bean\r\n    fun runtimeWiringConfigurer(): RuntimeWiringConfigurer {\r\n        val validationRules = ValidationRules.newValidationRules()\r\n            .onValidationErrorStrategy(OnValidationErrorStrategy.RETURN_NULL)\r\n            .build()\r\n        val schemaWiring = ValidationSchemaWiring(validationRules)\r\n\r\n        return RuntimeWiringConfigurer { builder: RuntimeWiring.Builder ->\r\n            builder.directiveWiring(schemaWiring).build()\r\n        }\r\n    }\r\n}\r\n```\r\n\r\nController:\r\n  ```\r\n   @MutationMapping\r\n    fun createCourse(\r\n        @Arguments createCourseDto: CreateCourseDto\r\n    ): CourseDto {\r\n        throw RuntimeException(\"exception from controller\")\r\n    }\r\n```\r\n\r\nGraphql:\r\n   ```\r\ndirective @NotBlank(message : String! = \"graphql.validation.NotBlank.message\") on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION\r\n\r\n createCourse(\r\n        name: String! @NotBlank\r\n    ): Course\r\n\r\ntype Course {\r\n    id: ID\r\n    name: String\r\n}\r\n```\r\n\r\nWhen I call this endpoint, the result is an empty object, in the background, an exception is being thrown (check the controller snippet above)\r\n\r\n```\r\n{\r\n  \"data\": {\r\n    \"createCourse\": {\r\n      \"id\": null,\r\n      \"name\": null\r\n    }\r\n  }\r\n}\r\n```\r\n\r\nBut If I remove the directive wiring config:\r\n```\r\n//@Configuration\r\n//class GraphQLConfig {\r\n//\r\n//    @Bean\r\n//    fun runtimeWiringConfigurer(): RuntimeWiringConfigurer {\r\n//        val validationRules = ValidationRules.newValidationRules()\r\n//            .onValidationErrorStrategy(OnValidationErrorStrategy.RETURN_NULL)\r\n//            .build()\r\n//        val schemaWiring = ValidationSchemaWiring(validationRules)\r\n//\r\n//        return RuntimeWiringConfigurer { builder: RuntimeWiring.Builder ->\r\n//            builder.directiveWiring(schemaWiring).build()\r\n//        }\r\n//    }\r\n//}\r\n```\r\n\r\nI do get the exception as usual:\r\n\r\n```\r\n{\r\n  \"errors\": [\r\n    {\r\n      \"message\": \"INTERNAL_ERROR for a9883b45-f615-258a-4f7a-bda5b432d485\",\r\n      \"locations\": [\r\n        {\r\n          \"line\": 2,\r\n          \"column\": 3\r\n        }\r\n      ],\r\n      \"path\": [\r\n        \"createCourse\"\r\n      ],\r\n      \"extensions\": {\r\n        \"classification\": \"INTERNAL_ERROR\"\r\n      }\r\n    }\r\n  ],\r\n  \"data\": {\r\n    \"createCourse\": null\r\n  }\r\n}\r\n```\r\n\r\nIs it something wrong with the code, or could this be a bug?\r\n","author":{"url":"https://github.com/jdsalasbarrantes","@type":"Person","name":"jdsalasbarrantes"},"datePublished":"2022-09-27T22:02:46Z","url":"https://github.com/graphql-java/graphql-java-extended-validation/issues/79"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:feb60adb-fe64-e207-7bf4-5689b80dad91
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC622:2E7A8:129037:18CAFB:6B018667
html-safe-nonced2f9bc9dbcd85d3d617de23011dfe96a7ec74c6c24b3a8e40bc1d0e6810c41d2
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNjIyOjJFN0E4OjEyOTAzNzoxOENBRkI6NkIwMTg2NjciLCJ2aXNpdG9yX2lkIjoiMzg5Mzg2ODk5MDc0MDY2MTg2MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac27d9765e048599b128c6a21e68d9fcc24314e6d81862930deeecaf2c253d65f4
hovercard-subject-tagissue:1388433036
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/graphql-java/graphql-java-extended-validation/79/issue_layout
twitter:imagehttps://opengraph.githubassets.com/000a0f4a9e2b9fb1185d21bef32bc7b5c0576dadeaf47518b95590412afe25c8/graphql-java/graphql-java-extended-validation/issues/79
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/000a0f4a9e2b9fb1185d21bef32bc7b5c0576dadeaf47518b95590412afe25c8/graphql-java/graphql-java-extended-validation/issues/79
og:image:altDescribe the bug I'm trying to connect kotlin, spring for graphql, and the validation feature, but when I add the directive wiring, the exceptions thrown in the service layer are not being displaye...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamejdsalasbarrantes
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
go-importgithub.com/graphql-java/graphql-java-extended-validation git https://github.com/graphql-java/graphql-java-extended-validation.git
octolytics-dimension-user_id14289921
octolytics-dimension-user_logingraphql-java
octolytics-dimension-repository_id205507809
octolytics-dimension-repository_nwographql-java/graphql-java-extended-validation
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id205507809
octolytics-dimension-repository_network_root_nwographql-java/graphql-java-extended-validation
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/graphql-java/graphql-java-extended-validation/issues/79#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgraphql-java%2Fgraphql-java-extended-validation%2Fissues%2F79
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgraphql-java%2Fgraphql-java-extended-validation%2Fissues%2F79
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=graphql-java%2Fgraphql-java-extended-validation
Reloadhttps://github.com/graphql-java/graphql-java-extended-validation/issues/79
Reloadhttps://github.com/graphql-java/graphql-java-extended-validation/issues/79
Reloadhttps://github.com/graphql-java/graphql-java-extended-validation/issues/79
graphql-javahttps://github.com/graphql-java
graphql-java-extended-validationhttps://github.com/graphql-java/graphql-java-extended-validation
Codehttps://github.com/graphql-java/graphql-java-extended-validation
Issues9 (9)https://github.com/graphql-java/graphql-java-extended-validation/issues
Pull requests9 (9)https://github.com/graphql-java/graphql-java-extended-validation/pulls
Actionshttps://github.com/graphql-java/graphql-java-extended-validation/actions
Projectshttps://github.com/graphql-java/graphql-java-extended-validation/projects
Security and qualityhttps://github.com/graphql-java/graphql-java-extended-validation/security
Insightshttps://github.com/graphql-java/graphql-java-extended-validation/insights
https://github.com/graphql-java/graphql-java-extended-validation
New issuehttps://github.com/login?return_to=https://github.com/graphql-java/graphql-java-extended-validation/issues/79
New issuehttps://github.com/login?return_to=https://github.com/graphql-java/graphql-java-extended-validation/issues/79
Exceptions not working as expected with Directive Wiringhttps://github.com/graphql-java/graphql-java-extended-validation/issues/79#top
https://github.com/jdsalasbarrantes
jdsalasbarranteshttps://github.com/jdsalasbarrantes
on Sep 27, 2022https://github.com/graphql-java/graphql-java-extended-validation/issues/79#issue-1388433036
https://github.com/JBO24
JBO24https://github.com/JBO24
on Oct 28, 2022https://github.com/graphql-java/graphql-java-extended-validation/issues/79#issuecomment-1294875337
https://github.com/jdsalasbarrantes
jdsalasbarranteshttps://github.com/jdsalasbarrantes
on Oct 29, 2022https://github.com/graphql-java/graphql-java-extended-validation/issues/79#issuecomment-1295698387
@JBO24https://github.com/JBO24
validatorhttps://docs.spring.io/spring-graphql/docs/current/reference/html/#controllers-schema-mapping-validation
Sign up for freehttps://github.com/signup?return_to=https://github.com/graphql-java/graphql-java-extended-validation/issues/79
Sign in to commenthttps://github.com/login?return_to=https://github.com/graphql-java/graphql-java-extended-validation/issues/79
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.