-
Notifications
You must be signed in to change notification settings - Fork 1.2k
21.x backport of #3539 ENF restriction for introspection #3540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…actory closer to structure on master
| import graphql.schema.GraphQLNamedOutputType; | ||
| import graphql.schema.GraphQLObjectType; | ||
| import graphql.schema.GraphQLSchema; | ||
| import graphql.schema.GraphQLType; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Git is extremely confused by the diff in this file. All other files are pretty much the result of Git cherry pick - this one is the only problematic one
There were major structural changes to this file to prepare for the defer feature to be released in v22. Of course Git can't work out what to do
Instead I've copy pasted the file from master, and deleted any defer references. This is essentially a copy of the non-defer pathway in master.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a good idea. So basically this is master code without the defer code added. Seems like a great idea.
The tests have not been changed AND they all pass so great approach
| import graphql.Assert; | ||
|
|
||
| import java.io.File; | ||
| import java.io.BufferedReader; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file was changed in another PR due to be included in the forthcoming v22 release. We have to backport this too.
| Map<String, FragmentDefinition> fragments, | ||
| CoercedVariables coercedVariableValues, | ||
| Options options) { | ||
| return new ExecutableNormalizedOperationFactoryImpl( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Structural change - a ExecutableNormalizedOperationFactoryImpl was added after v21.x, in preparation for defer
| return groupByCommonParentsNoDeferSupport(fields); | ||
| } | ||
|
|
||
| private List<CollectedFieldGroup> groupByCommonParentsNoDeferSupport(Collection<CollectedField> fields) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keeping in the "no defer" method in
Balance between wanting to make this file look like master (and reduce risk of bad cherry pick) and then having this odd sounding method talking about a feature in the future
I opted for safety
| int maxLevel) { | ||
| if (curLevel > maxLevel) { | ||
| throw new AbortExecutionException("Maximum query depth exceeded " + curLevel + " > " + maxLevel); | ||
| private static class ExecutableNormalizedOperationFactoryImpl { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New static class introduced to assist with new defer feature
bbakerman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yupp - ENF has great tests and this is passing. I like the approach taken
…#17666) [](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.graphql-java:graphql-java](https://togithub.com/graphql-java/graphql-java) | `21.4` -> `21.5` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>graphql-java/graphql-java (com.graphql-java:graphql-java)</summary> ### [`v21.5`](https://togithub.com/graphql-java/graphql-java/releases/tag/v21.5): 21.5 [Compare Source](https://togithub.com/graphql-java/graphql-java/compare/v21.4...v21.5) This is a special release to add further limits to introspection queries. This release contains a backport of PR [#​3539](https://togithub.com/graphql-java/graphql-java/issues/3539). #### What's Changed - 21.x backport of [#​3539](https://togithub.com/graphql-java/graphql-java/issues/3539) ENF restriction for introspection by [@​dondonz](https://togithub.com/dondonz) in [https://github.com/graphql-java/graphql-java/pull/3540](https://togithub.com/graphql-java/graphql-java/pull/3540) **Full Changelog**: graphql-java/graphql-java@v21.4...v21.5 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 10pm every weekday,before 6am every weekday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/camunda/zeebe). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMTMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjMxMy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhdXRvbWVyZ2UiXX0=-->
Backporting #3539 for 21.x. The difficulty is that there were major changes in
ExecutableNormalizedOperationFactoryin preparation for the new defer feature in v22.The changes in PR #3539 are harder and riskier to pull into the old
ExecutableNormalizedOperationFactorystructure. I propose it is safer to update 21.x (and prior versions) to the new file structureI want to have another close look at this PR with fresh eyes because this is a complicated cherry pick. Here's an early look and we'll get the build going