Giter VIP home page Giter VIP logo

Comments (16)

pekkah avatar pekkah commented on September 17, 2024 2

Looks like a bug as the stream is completed as soon as all all of the rows are pushed out. Timing issue. I'll check if this is fixed in the release 3.0.0 branch.

from server.

pekkah avatar pekkah commented on September 17, 2024 1

This shouldn't happen with the 3.0

from server.

pekkah avatar pekkah commented on September 17, 2024 1

I'll try making a proper test came for it. To me it feels like a bug in Reactive extensions but have to see. The stream is completed while subscribe call hasn't returned yet.

from server.

MartinDawson avatar MartinDawson commented on September 17, 2024

@pekkah Thanks a lot. Much appreciated.

from server.

MartinDawson avatar MartinDawson commented on September 17, 2024

@pekkah Fantastic, I'll test it later tonight. Thanks again.

from server.

MartinDawson avatar MartinDawson commented on September 17, 2024

@pekkah I just upgraded to graphql server 3.0 alpha and I still get this error.

Microsoft.AspNetCore.Server.Kestrel[13]
Connection id "0HLCCVEES2JD9", Request id "0HLCCVEES2JD9:00000001": An unhandled exception was thrown by the application.
System.NullReferenceException: Object reference not set to an instance of an object.
at GraphQL.Server.Transports.Subscriptions.Abstractions.Subscription.OnCompleted()
at System.Reactive.SafeObserver1.OnCompleted() at System.Reactive.Linq.ObservableImpl.Catch2..OnCompleted()
at System.Reactive.Linq.ObservableImpl.SelectMany2.SelectManyImpl.OnCompleted() at System.Reactive.Linq.ObservableImpl.Select2.
.OnCompleted()
at System.Reactive.Linq.ObservableImpl.ToObservable1._.LoopRec(State state, Action1 recurse)
at System.Reactive.Concurrency.Scheduler.<>c__DisplayClass49_01.<InvokeRec1>b__0(TState state1) at System.Reactive.Concurrency.Scheduler.<>c__DisplayClass49_11.b__2(IScheduler scheduler1, TState state3)
at System.Reactive.Concurrency.ScheduledItem2.InvokeCore() at System.Reactive.Concurrency.ScheduledItem1.Invoke()
at System.Reactive.Concurrency.CurrentThreadScheduler.Trampoline.Run(SchedulerQueue1 queue) at System.Reactive.Concurrency.CurrentThreadScheduler.Schedule[TState](TState state, TimeSpan dueTime, Func3 action)
at System.Reactive.Concurrency.LocalScheduler.Schedule[TState](TState state, Func3 action) at System.Reactive.Producer1.SubscribeRaw(IObserver1 observer, Boolean enableSafeguard) at System.Reactive.Producer1.Subscribe(IObserver`1 observer)
at GraphQL.Server.Transports.Subscriptions.Abstractions.Subscription.Subscribe(SubscriptionExecutionResult result)
at GraphQL.Server.Transports.Subscriptions.Abstractions.SubscriptionManager.d__11.MoveNext()

from server.

pekkah avatar pekkah commented on September 17, 2024

Fix in 3.1.0-alpha0004

from server.

MartinDawson avatar MartinDawson commented on September 17, 2024

@pekkah Still getting the same issue in alpha 0004.

from server.

pekkah avatar pekkah commented on September 17, 2024

At least this test now passes b8ab618

Could you create a failing test case for it?

from server.

MartinDawson avatar MartinDawson commented on September 17, 2024

@pekkah It seems to be entity framework specific, is calling .ToObservable valid for this? I have no idea about Reactive to be able to understand what's going wrong here or create a failing test case.

from server.

pekkah avatar pekkah commented on September 17, 2024

What are you trying to do?

from server.

MartinDawson avatar MartinDawson commented on September 17, 2024

@pekkah Create a comment system that automatically updates when users create a new comment. Similar to twitch.tv comments system.

from server.

pekkah avatar pekkah commented on September 17, 2024

I mean how are you planning to implement it? Now you're just trying to push the whole comments table contents trough the websocket to the client.

from server.

MartinDawson avatar MartinDawson commented on September 17, 2024

I am not sure how I was going to implement it. I wanted to solve this issue and then play around with it.

At the moment I am just doing this:

`const subscription = graphql`
  subscription commentSubscription {
    commentAdded {
      id
    }
  }
`;

export default () => requestSubscription(
  environment, // see Environment docs
  {
    subscription,
    onError: error => console.error(error), // eslint-disable-line no-console
  },
);
`

and calling it in my app.js.

from server.

MartinDawson avatar MartinDawson commented on September 17, 2024

Actually I guess I don't even need Entity Framework for this if I don't care about preserving the comments right? I can just copy the sample chat schema where the comments will last until app restart which seems good to me.

I'll try that.

from server.

sungam3r avatar sungam3r commented on September 17, 2024

Closed due to inactivity. @MartinDawson I hope you solved the problem.

from server.

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.