Tag: graphql-subscriptions
-
onConnvect, graphql-ws subscription
0 thank you for your time, my problem is that i want to return the data to the client immediately after subscribing. I know about the onConnect method, but it is called before JwtAuthGuard. What is the best way to do this? I was thinking of moving the authorization logic to onConnect. To better understand…
-
apollo explorer say “isTrusted”: true when i try use Subscription
3 guys, I have a problem when I want to use a Subscription I’m facing this issue I don’t find a solution in any place, I’m a GQL user and i decide to use Subscription to make real-time website but I’m facing a a this issue , hare is code I’m trying to show apollo…
-
Graphql Subscriptions field must return Async Iterable. Received: { pubsub
0 I’m trying go use subscriptions in graphql, but I’m receiving this weird error: subscription { notification { type message } } I’m using import { PubSub } from "graphql-subscriptions"; import { Inject } from "@nestjs/common"; import { Resolver, Subscription } from "@nestjs/graphql"; import { PubSub } from "graphql-subscriptions"; import { Notification } from "./models/notification";…
-
How to close the websocket in graphql config flutter?
1 class GraphqlConfig { final serverLink = Link.split( (request) => request.isSubscription, WebSocketLink( "mylink" ), HttpLink("mylink", defaultHeaders: <String, String>{ })); initClient() { ValueNotifier<GraphQLClient> client = ValueNotifier( GraphQLClient( link: serverLink, cache: GraphQLCache(), ), ); return client; } GraphQLClient clientToQuery() { return GraphQLClient( cache: GraphQLCache(), link: serverLink, ); } } I got the following exception DOMException: Failed to…
-
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…
-
Error Configuring GraphQL Subscriptions in ASP.NET Core
1 I am encountering an issue while configuring GraphQL subscriptions in my ASP.NET Core web api. I have followed the documentation and examples, but I’m receiving an error that I can’t seem to resolve. app.UseWebSockets(); app.UseGraphQLWebSockets<GraphQLSchema>("/graphql"); app.UseGraphQL<GraphQLSchema>(); Severity Code Description Project File Line Suppression State Error CS0012 The type ‘ISchema’ is defined in an assembly…
-
Cannot read properties of undefined (reading ‘FIELD’) when bumping @apollo/client to 3.8.x
0 I have a particular feature where I require to implement a second graphql client (using @apollo/client) that uses the old ws protocol for subscriptions – the other graphql client uses the latest one. This is a code snippet of a codesandbox link import React, { useState } from "react"; import reactLogo from "./assets/react.svg"; import…
-
Unhandled GraphQL subscription error, when using apollos subscribeToMore method in an angular chat component for subscription
5 Problem Description I have a chat component in angular that gets messages from the backend via a graphql query. On the same query, I subscribe to updates when a new message is added via a graphql mutation. The messages subscription is coded as a method of the chat component so that I can invoke…
-
What is the correct way to delete a post within a graphql subscription?
1 I’m working on a project where I have posts that are created and shown on a screen. I’ve done this using graphql subscriptions for real time updating of posts, but I need the user to also be able to delete their own posts and for that update to be shown in real time. The…
-
What is the correct way to delete a post in within a graphql subscription?
1 I’m working on a project where I have posts that are created and shown on a screen. I’ve done this using graphql subscriptions for real time updating of posts, but I need the user to also be able to delete their own posts and for that update to be shown in real time. The…