Tag: subscription
-
How to make sure my graphql subscription api is working?
0 This is my subscription resolver in golang: func (r *subscriptionResolver) CreateChatWithBot(ctx context.Context, req model.CreateChatWithBotRequest) (<-chan *model.CreateChatWithBotResults, error) { ch := make(chan *model.CreateChatWithBotResults) testString := []string{"This", "part", "is", "under", "construction", "…", " Be", "patient", "please!"} go func() { defer close(ch) for _, v := range testString { select { case <-ctx.Done(): return case ch <-…
-
in my localhost subscription is running but on server it is not wroking , throwing above message
-1 { "message": "Failed to construct ‘WebSocket’: An insecure WebSocket connection may not be initiated from a page loaded over HTTPS." } in my localhost subscription is running but on server it is not wroking , throwing above message. i want to run on server … graphql subscription wss ws graphql-ws Share Follow asked 10…
-
websocket subscription server not working. unable to reach subscription server graphql-ws ws
2 i follow the [same documentation code][1] for creating subscription server using websocket graphql, put it doesn’t work with graphql-ws and ws the code worked when i removed the serverCleanup definition, and it also woks well for older subscription library "subscription-transport-ws" my index.js const { ApolloServer } = require(‘apollo-server-express’) const { ApolloServerPluginDrainHttpServer } = require(‘apollo-server-core’)…
-
How client sends close signal to graphql subscription server?
0 I’m working on a graphql server and there is one subscription API. This is the starter code I found on gqlgen documentation: // CurrentTime is the resolver for the currentTime field. func (r *subscriptionResolver) CurrentTime(ctx context.Context) (<-chan *model.Time, error) { // First you’ll need to `make()` your channel. Use your type here! ch :=…
-
React-native AWS amplify graphQl Subscription
0 In my react native project, I am using graphQl subscription with aws-amplify. The problem is it’s not getting notified/called when the backend sends a notification. The backend developer told me, that from their side notification is sending correctly. Now from the Front end side setup is also properly done because one other subscription is…
-
How do I implement GraphQL subscription in ASP.NET Core Web API using Graphql.net library?
0 I’m currently working with GraphQL version 7.6.1, graphql.server.transport.websockets version 4.4.1, and graphql.server.transport.aspnetcore version 7.6.0, and I’m struggling to find up-to-date documentation or examples for adding subscriptions to my ASP.NET Core Web API. I attempted to implement subscriptions based on older examples, but due to changes in syntax and other aspects, I’m encountering errors that…
-
How does the graphql-flutter cache update work when using subscriptions?
0 I am trying to build an app that uses GraphQL with the graphql-flutter package and with Blocs. I generated my graphql classes with the graphql_codegen package. In this app a list of events (the ‘History’) is shown. A few items are loaded, and after this ‘infinitive scroll’ will execute the ‘fetch more’ calls. The…
-
is it possible to have a single subscription waiting for data from multiple sources using graphql strawberry?
0 I am expecting to get data from multiple sources via single subscription if the data is not available in the source yield empty response, for certain number of retries @strawberry.type class DataFromSources: source_1 : JSON source_2 : JSON @strawberry.type class Subscription: @strawberry.subscription async def data_from_sources(self, target: int = 10) -> AsyncGenerator[DataFromSources, None]: source_1, source_2…
-
Nest JS: Object is possibly ‘undefined’ in GraphQL
0 I tried to make the subscription update course in the nest js, but it turns out error Object is possibly ‘undefined’ in this line of code const course = await this.courseService.findOne({ id: variables.courseId }); below is my course.resolver.ts @Subscription(‘courseUpdated’, { resolve: (value) => value, filter: async (payload, variables) => { const course = await…