Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

GraphQL client cancel long running query #10574


User avatar
0
[email protected] created

Product version: 10.4.0 Product type: Angular Framework type: .net core

I'm currently implementing some GraphQL endpoints but it's unclear to me how a client of the endpoint can cancel a long-running query. In the IResolveFieldContext type there is a get only CancellationToken, so I'm assuming that setting it from the client should be possible. I can't find any documentation on this in the asp.net zero docu or even any graphql libraries. We're using these endpoints from within R so we're using the ghql library for communication with these endpoints. Any suggestion on this matter?


1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @existential040

    As far as I can find, the GraphQL library doesn't support timeouts yet, see https://github.com/graphql-dotnet/server/issues/140.

    But, since this is an ASP.NET Core query, you can search for cancelling an ASP.NET Core web requet on the web.