René's URL Explorer Experiment


Title: Evidence of bug in query and validate that warrants further investigation · Issue #2740 · graphql-java/graphql-java · GitHub

Open Graph Title: Evidence of bug in query and validate that warrants further investigation · Issue #2740 · graphql-java/graphql-java

X Title: Evidence of bug in query and validate that warrants further investigation · Issue #2740 · graphql-java/graphql-java

Description: Discussed in #2739 Originally posted by arjunballa February 25, 2022 How to validate graphql query against the schema without execution? I tried below methods and all failed. @bbakerman @andimarek Any pointers? Schema: No mutations defin...

Open Graph Description: Discussed in #2739 Originally posted by arjunballa February 25, 2022 How to validate graphql query against the schema without execution? I tried below methods and all failed. @bbakerman @andimarek ...

X Description: Discussed in #2739 Originally posted by arjunballa February 25, 2022 How to validate graphql query against the schema without execution? I tried below methods and all failed. @bbakerman @andimarek ...

Opengraph URL: https://github.com/graphql-java/graphql-java/issues/2740

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Evidence of bug in query and validate that warrants further investigation","articleBody":"### Discussed in https://github.com/graphql-java/graphql-java/discussions/2739\r\n\r\n\u003cdiv type='discussions-op-text'\u003e\r\n\r\n\u003csup\u003eOriginally posted by **arjunballa** February 25, 2022\u003c/sup\u003e\r\nHow to validate graphql query against the schema without execution?\r\n\r\nI tried below methods and all failed.\r\n\r\n@bbakerman  @andimarek  Any pointers?\r\n\r\n**Schema:** No mutations defined\r\n**Request:** mutation\r\n**Method:** ParseAndValidate.validate\r\nReturns it as `valid`. If I add mutation with dummy `FieldDefinition` it works. \r\n\r\n```\r\n\t@Test\r\n\tpublic void testValidateWithInvalidRequestUsingSchemaWithOnlyQueryAndInputWithMutation()\r\n\t\t\tthrows SchemaProblem, FileNotFoundException {\r\n\r\n\t\tInputStream in = this.getClass().getResourceAsStream(\"/only-query.graphql\");\r\n\r\n\t\tTypeDefinitionRegistry typeDefinitionRegistry = new SchemaParser().parse(in);\r\n\r\n\t\tGraphQLSchema schema = UnExecutableSchemaGenerator.makeUnExecutableSchema(typeDefinitionRegistry);\r\n\r\n\t\tString request = \"mutation MyMutation { mymutation }\";\r\n\r\n\t\tDocument inputDocument = new Parser().parseDocument(request);\r\n\r\n\t\tList\u003cValidationError\u003e errors = ParseAndValidate.validate(schema, inputDocument);\r\n\r\n\t\tassertEquals(1, errors.size());\r\n\t}\r\n\r\n```\r\n**Schema:** No mutations defined\r\n**Request:** mutation\r\n**Method:** ParseAndValidate.parseAndValidate\r\nReturns it as `valid`. If I add mutation with dummy `FieldDefinition` it works. \r\n```\r\n\t@Test\r\n\tpublic void testParseAndValidateWithInvalidRequestUsingSchemaWithOnlyQueryAndInputWithMutation()\r\n\t\t\tthrows SchemaProblem, FileNotFoundException {\r\n\t\tInputStream in = this.getClass().getResourceAsStream(\"/only-query.graphql\");\r\n\r\n\t\tTypeDefinitionRegistry typeDefinitionRegistry = new SchemaParser().parse(in);\r\n\r\n\t\tGraphQLSchema schema = UnExecutableSchemaGenerator.makeUnExecutableSchema(typeDefinitionRegistry);\r\n\r\n\t\tString request = \"mutation MyMutation { mymutation }\";\r\n\r\n\t\tExecutionInput input = ExecutionInput.newExecutionInput(request).build();\r\n\r\n\t\tParseAndValidateResult result = ParseAndValidate.parseAndValidate(schema, input);\r\n\r\n\t\tassertEquals(1, result.getErrors().size());\r\n\t}\r\n```\r\n**Schema:** Has mutation with not null return type\r\n**Request:** mutation\r\n**Method:** ParseAndValidate.parseAndValidate\r\nMockedWiringFactory is expecting the actual return.\r\n**Error:** \r\n```\r\njava.lang.AssertionError: expected same:\u003c\u003e was not:\u003c[graphql.execution.MissingRootTypeException: \r\nSchema is not configured for mutations.]\u003e\r\n```\r\n\r\n```\r\n\t@Test\r\n\tpublic void testMockedWiringFactoryWithValidRequest() throws SchemaProblem, FileNotFoundException {\r\n\t\tInputStream in = this.getClass().getResourceAsStream(\"/mutation-query.graphql\");\r\n\r\n\t\tTypeDefinitionRegistry typeDefinitionRegistry = new SchemaParser().parse(in);\r\n\r\n\t\tRuntimeWiring runtimeWiring = RuntimeWiring.newRuntimeWiring().wiringFactory(new MockedWiringFactory()).build();\r\n\r\n\t\tSchemaGenerator schemaGenerator = new SchemaGenerator();\r\n\r\n\t\tGraphQLSchema graphQLSchema = schemaGenerator.makeExecutableSchema(typeDefinitionRegistry, runtimeWiring);\r\n\r\n\t\tGraphQL graphQL = GraphQL.newGraphQL(graphQLSchema).build();\r\n\r\n\t\tString request = \"mutation MyMutation { mymutation }\";\r\n\r\n\t\tExecutionInput input = ExecutionInput.newExecutionInput(request).build();\r\n\r\n\t\tExecutionResult executionResult = graphQL.execute(input);\r\n\r\n\t\tassertSame(\"\", executionResult.getErrors().toString());\r\n\r\n\t\tassertEquals(0, executionResult.getErrors().size());\r\n\t}\r\n```\r\n\r\n\r\n\r\n\u003c/div\u003e","author":{"url":"https://github.com/bbakerman","@type":"Person","name":"bbakerman"},"datePublished":"2022-02-25T06:22:51.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/2740/graphql-java/issues/2740"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:7b02224e-7335-b267-1953-6b5b397a68c3
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9B10:3EDED5:1FE5BD:29CDFA:6A60254B
html-safe-noncefd8892acc62456cb5642c64655363fe9d6a59e5a430bdf1073e7995e17f3a4c5
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QjEwOjNFREVENToxRkU1QkQ6MjlDREZBOjZBNjAyNTRCIiwidmlzaXRvcl9pZCI6IjQwMjYwMTMxNjQzNTQxNTE3NTUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmace50e6c5310c0835050119663fc64c8fd6481ae96a5a9bb1472edb68dd76bbdaf
hovercard-subject-tagissue:1150088823
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/2740/issue_layout
twitter:imagehttps://opengraph.githubassets.com/f001c5c9ddb22b2851e075ea279d0f93614dc66d8b20bfde2167cd7742a3eef4/graphql-java/graphql-java/issues/2740
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/f001c5c9ddb22b2851e075ea279d0f93614dc66d8b20bfde2167cd7742a3eef4/graphql-java/graphql-java/issues/2740
og:image:altDiscussed in #2739 Originally posted by arjunballa February 25, 2022 How to validate graphql query against the schema without execution? I tried below methods and all failed. @bbakerman @andimarek ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamebbakerman
hostnamegithub.com
expected-hostnamegithub.com
None60da8c2a42fa2bbf5f7567474990ec467836a84444262a58e200fa91b7f3d2d0
turbo-cache-controlno-preview
go-importgithub.com/graphql-java/graphql-java git https://github.com/graphql-java/graphql-java.git
octolytics-dimension-user_id14289921
octolytics-dimension-user_logingraphql-java
octolytics-dimension-repository_id38602457
octolytics-dimension-repository_nwographql-java/graphql-java
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id38602457
octolytics-dimension-repository_network_root_nwographql-java/graphql-java
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
release9824515e740d83d5eb82168a089b806ab0fe04a1
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/graphql-java/graphql-java/issues/2740#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgraphql-java%2Fgraphql-java%2Fissues%2F2740
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
Code QualityEnforce quality at mergehttps://github.com/features/code-quality
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
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
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://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
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgraphql-java%2Fgraphql-java%2Fissues%2F2740
Sign up https://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
Reloadhttps://github.com/graphql-java/graphql-java/issues/2740
Reloadhttps://github.com/graphql-java/graphql-java/issues/2740
Reloadhttps://github.com/graphql-java/graphql-java/issues/2740
Please reload this pagehttps://github.com/graphql-java/graphql-java/issues/2740
graphql-java https://github.com/graphql-java
graphql-javahttps://github.com/graphql-java/graphql-java
Notifications https://github.com/login?return_to=%2Fgraphql-java%2Fgraphql-java
Fork 1.1k https://github.com/login?return_to=%2Fgraphql-java%2Fgraphql-java
Star 6.2k https://github.com/login?return_to=%2Fgraphql-java%2Fgraphql-java
Code https://github.com/graphql-java/graphql-java
Issues 26 https://github.com/graphql-java/graphql-java/issues
Pull requests 11 https://github.com/graphql-java/graphql-java/pulls
Discussions https://github.com/graphql-java/graphql-java/discussions
Actions https://github.com/graphql-java/graphql-java/actions
Projects https://github.com/graphql-java/graphql-java/projects
Wiki https://github.com/graphql-java/graphql-java/wiki
Security and quality 0 https://github.com/graphql-java/graphql-java/security
Insights https://github.com/graphql-java/graphql-java/pulse
Code https://github.com/graphql-java/graphql-java
Issues https://github.com/graphql-java/graphql-java/issues
Pull requests https://github.com/graphql-java/graphql-java/pulls
Discussions https://github.com/graphql-java/graphql-java/discussions
Actions https://github.com/graphql-java/graphql-java/actions
Projects https://github.com/graphql-java/graphql-java/projects
Wiki https://github.com/graphql-java/graphql-java/wiki
Security and quality https://github.com/graphql-java/graphql-java/security
Insights https://github.com/graphql-java/graphql-java/pulse
Evidence of bug in query and validate that warrants further investigationhttps://github.com/graphql-java/graphql-java/issues/2740#top
Stalehttps://github.com/graphql-java/graphql-java/issues?q=state%3Aopen%20label%3A%22Stale%22
https://github.com/bbakerman
bbakermanhttps://github.com/bbakerman
on Feb 25, 2022https://github.com/graphql-java/graphql-java/issues/2740#issue-1150088823
#2739https://github.com/graphql-java/graphql-java/discussions/2739
@bbakermanhttps://github.com/bbakerman
@andimarekhttps://github.com/andimarek
Stalehttps://github.com/graphql-java/graphql-java/issues?q=state%3Aopen%20label%3A%22Stale%22
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.