Skip to content

Commit 8845e49

Browse files
authored
feat(graphql): Set max execution depth to 10 (#1431)
<!--- Provide a general summary of your changes in the Title above --> ## Description <!--- Describe your changes in detail --> We have the possibility for "infinite" recursion in our parties query (sub-parties) ``` parties { subParties { subParties { subParties { subParties { ... } } } } } ``` Capping the global query depth level at 10. (Max depth on dialogById seems to be 7) ``` query q { dialogById(dialogId: "c8147d41-936e-4124-8119-ea1add40c4b4") { dialog { transmissions { content { title { mediaType value { value } } } } } } } ``` ## Related Issue(s) - #1430
1 parent 6a9cd69 commit 8845e49

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Digdir.Domain.Dialogporten.GraphQL/ServiceCollectionExtensions.cs

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public static IServiceCollection AddDialogportenGraphQl(this IServiceCollection
2525
.AddType<SearchDialogValidationError>()
2626
.AddType<SearchDialogForbidden>()
2727
.AddType<SetSystemLabelEntityNotFound>()
28+
.AddMaxExecutionDepthRule(10)
2829
.AddInstrumentation()
2930
.InitializeOnStartup()
3031
.Services;

0 commit comments

Comments
 (0)