Try ExtensionsBuilder
, much less code https://stackoverflow.com/a/77183562/6166627.
Be aware that some gql clients don't support top-level extensions like Apollo.
As an alternative, consider just putting your warnings inside the data itself: "data": {"warnings":[{"code":"NOT_FOUND", ids: [1,2,3], message: "Articles not found"}], articles:[...]}
related https://github.com/spring-projects/spring-graphql/issues/1138