smallrye-graphql
smallrye-graphql copied to clipboard
EventingService.afterDataFetch called with wrong context on multi field query
For a query
query q135 {
operation1
operation3
operation5
}
The execution order in a EventingService seems to look like this(ExecutionId=145725331828):
LoggingEventservice beforeExecute 145725331828
LoggingEventservice beforeDataFetch operation1 145725331828
Resource operation1
LoggingEventservice beforeDataFetch operation3 145725331828
Resource operation3
LoggingEventservice beforeDataFetch operation5 145725331828
Resource operation5
Resource Done operation3
LoggingEventservice afterDataFetch operation5 145725331828
Resource Done operation1
LoggingEventservice afterDataFetch operation5 145725331828
Resource Done operation5
LoggingEventservice afterDataFetch operation5 145725331828
LoggingEventservice afterExecute 145725331828
Changing the order of operations in the query changes the context fieldname called first, it looks like the context of the last operation in the query always is the context used in afterDataFetch.
I have updated the reproducer for issue 1455, the log above is from a run of the reproducer.
This does look wrong. I can try to have a look into it after the Christmas break.
https://github.com/smallrye/smallrye-graphql/pull/2085 should fix this