When I was learning about WWI in high school (mid-2000s) I was taught that the War was inevitable. Going off my history textbook, a global war was pretty much bound to happen due to things like the overlapping network of alliances, great power competition, and technological change.
Has this always been the narrative surrounding the First World War? For example, would textbooks in the 1920s or 1930s have portrayed the war as the "inevitable" result of European international relations? Did the Second World War change how the causes of the First World War were viewed?
I'm not asking whether or not the "inevitable" view is "correct", but rather has that always been the main way of presenting the narrative.
In my experience, most of the revisions were made within the overall narrative of WWI that you've described, focusing instead on who exactly was to blame for the ultimate outbreak of the war. For most of the 20th century the scholars seem to have been preoccupied with the location of the "smoking gun", and it shifted from Germany, to the Western alliances, to Austria-Hungary, and back to Germany, as well as some other participants. Or, in other words, the conditions made the war possible, but the relevant guilty party (or parties) was the one(s) ultimately responsible for the outbreak, and, having the sole responsibility for the start of the war, were the ones who theoretically could have prevented it. The reading of WWI as "inevitable" came about a bit later, and tended to spread the blame a bit more evenly, but in effect it prioritized long-term collective responsibility, while short-term causes were still largely attributed to individual actors (or blocs of actors).
More specifically however, recently there was an uptick in scholarship that argues that Would War I was NOT inevitable, and the general war could have been avoided, in some cases up until August 4th.
The best work that deals specifically with this notion is probably Margaret Macmillan's "The War that Ended Peace: Road to 1914".
Macmillan argues that the most important lurch towards the war took place between the Sarajevo assassination on June 28, and August 4 1914. She insists that the most crucial decisions that ended up leading to the outbreak of the hostilities were taken by a relatively small group of men in that period, and that almost every single one of them had the opportunity to take a different decision on certain matters. She also points out the proliferation of various factors that were making a general war less likely at the time, such as labour movements, investment and capital flows, and migration and international communication. Unfortunately, I don't have my copy of the book at hand right now, so I cannot provide any specific detail as per her argumentation, but she dedicates a lot of time to going over the personalities of the most important decision-makers at the time and the circumstances and the overall context which they were forced to make decisions in.
EDIT: Slightly changed the argument presented in the first paragraph.
It sounds like you're asking about the historiography of the causes of WWI, and certainly there has been an unending argument about that since 1914 itself. What's unique about WWI is that, being the first major conflict of the 20th century, it's not that sources are few, there are simply far too many. Millions of pages of diplomatic correspondence or memoirs or newspaper articles, it's to the point that it's physically impossible to read it all, and that if you're picky enough about what you look at, you can reasonably blame any of the belligerent powers for the outbreak, and as a matter of fact there is at least one major work blaming each possible combination of powers: it was France and Russia, it was Germany and Austria, it was Germany alone, it was Britain, it's staggering how much you have to sift through with WWI.
To get back to your point, I think there are two major works you have to read if you want to see the "top hits" of academia on the causes of WWI: Fritz Fischer and Christopher Clark.
In the 60's Fischer wrote a monumental work called (in English) Germany's Aims in the First World War and to make a long story short he put more or less the sole blame of WWI on Germany, or at the very least for making a global war out of a local Balkan dispute. He makes a compelling case and he absolutely had evidence to back it up, going into minute detail researching German govt documents. For a long time after the debate was whether you agreed with the "fischer controversy" or not. A main critique of fischer is that he takes german documents at face value (for example concerning the Schlieffen plan, there are arguments that it was really a ploy to get more funding to the armed forces, the plan uses units that didn't exist at the time). If anyone more familiar with Fischer's work would care to jump in please feel free to do so, I'm much more familiar with clark
In 2012 Christopher Clark published what's become a landmark work on WWI origins called The Sleepwalkers: How Europe Went to War in 1914, and his main thesis is that so much time and ink has been spent exploring why WWI happened, we've ignored how it did. He cites a quote from Bulgarian historian Buldinov "once we pose the question "why", guilt becomes the focal point." Sleepwalkers explores the chronology of events of the July crisis and how the actions of one party's actors were perceived by another, and from my point of view at least provides very convincing arguments, especially with what is known as the security problem: defensive actions that are taken by one state out of fear of a rival are taken as aggressive by the other. Germany's actions that are taken as belligerent by Fischer seem much more reactionary when put in the context of an atmosphere of paranoia about encirclement. Each power was scared of the ability of other nations' presses to force their govt to push forward with hardline nationalism while simultaneously discounting their own (each govt of the time paid very special attention to the leading newspapers of their rivals). The Entente was by no means an anti-german coalition and Clark makes a convincing argument that within a couple of years Britain and Russia would have probably stopped cooperating and returned to seeing eachother as rivals. I'm afraid I'm not doing Clark's work justice these are just isolated points, but his main contention is that the war wasn't inevitable, but it's actors believed it to be so, they saw themselves as on an irreversible path, and so could not see viable diplomatic alternatives open to them and so "sleepwalked" to war.
Clark's work is very popular right now, and with good reason I believe, especially since its focus on taking "blame" out of the equation it's very popular in German circles, and for precisely this reason there are British historians who criticize it. For now at least Sleepwalkers is probably the best example of modern historiography of WWI origins