Giter Site home page Giter Site logo

[lsp-server] vscode-graphql triggers large amounts of requests to my graphql server for bulk file change events in 0.11.0 about graphiql HOT 4 OPEN

Slessi avatar Slessi commented on July 20, 2024 14
[lsp-server] vscode-graphql triggers large amounts of requests to my graphql server for bulk file change events in 0.11.0

from graphiql.

Comments (4)

acao avatar acao commented on July 20, 2024 6

I have an update! I've identified what might be the true source of the issue, which is MessageProcessor.cacheConfigSchemaFile() - this method is what re-writes the cached SDL file for mixed/network schema config scenarios, and it just needs to be debounced, along with ensuring the debounce-ish effect of the short TTL schema LRU cache, hoping to have a working fix tomorrow as I juggle a few unexpected disruptions this week

from graphiql.

acao avatar acao commented on July 20, 2024 4

@Slessi looking into this today, the new schema polling should not be behaving like this on watch events. Something is resetting the schema cache for every watched file change, and it should not be

from graphiql.

acao avatar acao commented on July 20, 2024 4

update: I've churned on it some this afternoon and I think the lru-cache invalidation needs more work because of the file watching/mass file change case I hadn't considered. Luckily the new integration tests I've added helped me spot regressions for the cache lifecycle in one approach to this bug that I've tried. If I can't find a solution by mid day tomorrow, maybe sooner, I may just remove the new lru-cache based schema polling cache invalidation logic and patch 0.11.x until I can make sure it's working properly for the mass watched file changes case - which is not just an issue for users of graphql-codegen, but any other codegens for frameworks in other languages, or even codegens which are unrelated. I imagine the same bug happens with a git pull and a huge upstream diff.

I added this feature at the end of preparing this release, and only tested with editor file changes (oof), but it's actually quite small to remove and only one of many improvements 0.11.x offers

from graphiql.

acao avatar acao commented on July 20, 2024 4

today I'm working on manually re-creating exactly this bug with a decently sized project, instead of just mimicking it, so I can be sure we have a proper fix. sorry it's taking so long!

from graphiql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.