GithubHelp home page GithubHelp logo

End-of-request hook about graphql-tools HOT 3 CLOSED

ardatan avatar ardatan commented on May 1, 2024 1
End-of-request hook

from graphql-tools.

Comments (3)

helfer avatar helfer commented on May 1, 2024

My current idea for this is that connectors should implement an interface that does that. Apart from connectors, nothing else in the request should have any state.

Connectors will implement a constructor that takes the context as an argument, and a destructor that gets called at the end of the query. The constructor can get set up resources, and the destructor can tear them down. Care must be taken to ensure that destruction happens even if there was an error during the course of query execution.

from graphql-tools.

stubailo avatar stubailo commented on May 1, 2024

Ooh, that sounds like a great feature for connectors.

from graphql-tools.

helfer avatar helfer commented on May 1, 2024

I'm starting to think that this is best done in the server, so we should keep track of it in apollo server.

from graphql-tools.

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.