Giter VIP home page Giter VIP logo

Comments (2)

kefniark avatar kefniark commented on June 21, 2024 4

An ugly hack for anyone else running into it

You can redefine your own withFilter and ResolveFn, with as described above AsyncIterator => AsyncIterable

import { withFilter as withFilterOriginal, FilterFn } from 'graphql-subscriptions'

type ResolverFn<TSource = any, TArgs = any, TContext = any> = (
  rootValue?: TSource,
  args?: TArgs,
  context?: TContext,
  info?: any
) => AsyncIterable<any>

export const withFilter = withFilterOriginal as unknown as (
  asyncIteratorFn: ResolverFn,
  filterFn: FilterFn
) => ResolverFn

It's a really annoying issue, because it's a pure typing problem and it's probably a one liner to fix here

from graphql-subscriptions.

Aeolun avatar Aeolun commented on June 21, 2024

For those not interested in switching to a whole different server to fix a minor issue, I've published a fork here: Aeolun/graphql-subscriptions-continued that basically just releases the release-3.0 branch in this repository.

It doesn't update the dependent packages (e.g. graphql-redis-subscriptions), but if they feel like it they can switch.

from graphql-subscriptions.

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.