Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subscription Resolvers Type Error with withFilter #8547

Closed
daytona63 opened this issue Oct 31, 2022 · 6 comments
Closed

Subscription Resolvers Type Error with withFilter #8547

daytona63 opened this issue Oct 31, 2022 · 6 comments
Labels
core Related to codegen core/cli

Comments

@daytona63
Copy link

Describe the bug

SubscriptionResolvers does not handle the type of withFilter

Your Example Website or App

Non

Steps to Reproduce the Bug or Issue

Run with the Codegen Config File

Expected behavior

SubscriptionResolvers To work with withFilter

Screenshots or Videos

No response

Platform

  • OS: macOS M1 Pro
  • NodeJS: v18.12.0 LTS
  • graphql: "^16.6.0"
  • @graphql-codegen/add: "^3.2.1"
  • @graphql-codegen/cli: "^2.13.8"
  • @graphql-codegen/gql-tag-operations-preset: "^1.7.0"
  • @graphql-codegen/graphql-modules-preset: "^2.5.4"
  • @graphql-codegen/introspection: "^2.2.1"
  • @graphql-codegen/typescript: "^2.8.0"
  • @graphql-codegen/typescript-document-nodes: "^2.3.5"
  • @graphql-codegen/typescript-resolvers: "^2.7.5"

Codegen Config File

definitions:
add: &top-comment
content: >
/**
* NOTE: THIS IS AN AUTO-GENERATED FILE. DO NOT MODIFY IT DIRECTLY.
*/

  /* eslint-disable */

  // 👇️ ts-nocheck ignores all ts errors in the file

  // eslint-disable-next-line @typescript-eslint/ban-ts-comment

  // @ts-nocheck

overwrite: true
watch: false
schema: './src/gql/**/typeDefs/.gql'
emitLegacyCommonJSImports: false
generates:
./src/gql/:
preset: graphql-modules
presetConfig:
baseTypesPath: ../generated-types/graphql.ts # Where to create the complete schema types
filename: generated-types/module-types.ts # Where to create each module types
plugins:
- add: *top-comment
- add:
content: 'import { CustomScalars } from "../shared/scalars.js"'
- typescript:
enumsAsTypes: false
typesPrefix: GQL_
scalars:
Upload: CustomScalars['Upload']
Date: CustomScalars['Date']
DateTime: CustomScalars['DateTime']
EmailAddress: CustomScalars['EmailAddress']
JSON: CustomScalars['JSON']
ObjectID: CustomScalars['ObjectID']
UUID: CustomScalars['UUID']
- typescript-resolvers:
enumsAsTypes: false
typesPrefix: GQL_
noNamespaces: true
useIndexSignature: true
contextType: 'GraphQLModules.GlobalContext'

./graphql.schema.json:
plugins:
- 'introspection'

Additional context

No response

@ardatan
Copy link
Collaborator

ardatan commented Oct 31, 2022

Please share a reproduction using our template.

@daytona63
Copy link
Author

@ardatan here you go

https://codesandbox.io/s/suspicious-ritchie-ysvvqs?file=/package.json

@charlypoly charlypoly added the core Related to codegen core/cli label Nov 3, 2022
@hfgn
Copy link

hfgn commented May 17, 2023

Hi @ardatan @daytona63 i have the issue.
Do you have any solution?

@daytona63
Copy link
Author

@hfgn I believe once this PR is merged in graphql subscriptions, then this will be fixable

@Urigo
Copy link
Collaborator

Urigo commented May 18, 2023

After so many years of that Apollo library not being maintained, I wouldn't count on it releasing a new version or merging PRs...
Check out this discussion here

If you are using GraphQL Subscriptions, I would highly recommend you to use Yoga Server

@n1ru4l
Copy link
Collaborator

n1ru4l commented May 19, 2023

Duplicate of #7197

@n1ru4l n1ru4l marked this as a duplicate of #7197 May 19, 2023
@n1ru4l n1ru4l closed this as completed May 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Related to codegen core/cli
Projects
None yet
Development

No branches or pull requests

6 participants