Comments (16)
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.
This shouldn't happen with the 3.0
from server.
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.
@pekkah Thanks a lot. Much appreciated.
from server.
@pekkah Fantastic, I'll test it later tonight. Thanks again.
from server.
@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.Catch
2..OnCompleted()
at System.Reactive.Linq.ObservableImpl.SelectMany2.SelectManyImpl.OnCompleted() at System.Reactive.Linq.ObservableImpl.Select
2..OnCompleted()
at System.Reactive.Linq.ObservableImpl.ToObservable1._.LoopRec(State state, Action
1 recurse)
at System.Reactive.Concurrency.Scheduler.<>c__DisplayClass49_01.<InvokeRec1>b__0(TState state1) at System.Reactive.Concurrency.Scheduler.<>c__DisplayClass49_1
1.b__2(IScheduler scheduler1, TState state3)
at System.Reactive.Concurrency.ScheduledItem2.InvokeCore() at System.Reactive.Concurrency.ScheduledItem
1.Invoke()
at System.Reactive.Concurrency.CurrentThreadScheduler.Trampoline.Run(SchedulerQueue1 queue) at System.Reactive.Concurrency.CurrentThreadScheduler.Schedule[TState](TState state, TimeSpan dueTime, Func
3 action)
at System.Reactive.Concurrency.LocalScheduler.Schedule[TState](TState state, Func3 action) at System.Reactive.Producer
1.SubscribeRaw(IObserver1 observer, Boolean enableSafeguard) at System.Reactive.Producer
1.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.
Fix in 3.1.0-alpha0004
from server.
@pekkah Still getting the same issue in alpha 0004.
from server.
At least this test now passes b8ab618
Could you create a failing test case for it?
from server.
@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.
What are you trying to do?
from server.
@pekkah Create a comment system that automatically updates when users create a new comment. Similar to twitch.tv comments system.
from server.
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.
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.
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.
Closed due to inactivity. @MartinDawson I hope you solved the problem.
from server.
Related Issues (20)
- Using Altair UI while not connected to the internet HOT 3
- How to use plugins in Altair? HOT 6
- Duende Identity Server 4 / GraphQl Authorize - Always error 403 HOT 16
- Missing classes while upgrading to GraphQL.Server.All from GraphQL.Server.* libraries HOT 11
- Disable ReadFormOnPost by default
- Add CSRF protection
- Content Security Policy and CDN Scripts HOT 8
- I'm attempting to implement a dual authentication scheme and I'm wondering whether it's feasible. If it is possible, could you assist me by pointing out any mistakes I might be making? HOT 13
- Invalid HTML HOT 2
- Could not load type 'GraphQL.Server.Transports.AspNetCore.IGraphQLRequestDeserializer' from assembly HOT 2
- Limit number of queries in batch request
- GraphiQL Explorer is no longer there in version 8.x? HOT 1
- Come up with something for comments about Accept header
- Question: Extensibility to use other transport protocol? HOT 5
- Question about upgrading from 6xx to 7xx: VoyagerOptions HOT 4
- Subscriptions set-up netcore 6.0, GraphQL 7.1.1 HOT 6
- HttpStatus Code on GRAPHQL_VALIDATION error HOT 7
- Is there a way to change the status code of the authorization extension from 400 to 401? HOT 11
- Validation rules and Policies errors after update to v7 HOT 11
- .net core 7 AddAuthorizationRule not work HOT 29
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from server.