Giter Club home page Giter Club logo

graphql-tools-type-mismatch-repro's Introduction

❯ yarn tsc
yarn run v1.22.10
src/index.ts:26:36 - error TS2345: Argument of type '<TReturn, TArgs, TContext>({ document, variables, context, info, }: { document: any; variables: TArgs; context: TContext; info: any; }) => Promise<FetchResult<TReturn, Record<string, any>, Record<string, any>>>' is not assignable to parameter of type 'AsyncExecutor'.
  Types of parameters '__0' and 'params' are incompatible.
    Type 'ExecutionParams<TArgs, TContext>' is not assignable to type '{ document: any; variables: TArgs | undefined; context: TContext | undefined; info: any; }'.
      Property 'variables' is optional in type 'ExecutionParams<TArgs, TContext>' but required in type '{ document: any; variables: TArgs | undefined; context: TContext | undefined; info: any; }'.

26     schema: await introspectSchema(executor),
                                      ~~~~~~~~

src/index.ts:27:5 - error TS2322: Type '<TReturn, TArgs, TContext>({ document, variables, context, info, }: { document: any; variables: TArgs; context: TContext; info: any; }) => Promise<FetchResult<TReturn, Record<string, any>, Record<string, any>>>' is not assignable to type 'Executor'.
  Types of parameters '__0' and 'params' are incompatible.
    Type 'ExecutionParams<TArgs, TContext>' is not assignable to type '{ document: any; variables: TArgs | undefined; context: TContext | undefined; info: any; }'.
      Property 'variables' is optional in type 'ExecutionParams<TArgs, TContext>' but required in type '{ document: any; variables: TArgs | undefined; context: TContext | undefined; info: any; }'.

27     executor,
       ~~~~~~~~

  node_modules/@graphql-tools/delegate/types.d.ts:109:5
    109     executor?: Executor;
            ~~~~~~~~
    The expected type comes from property 'executor' which is declared here on type 'SubschemaConfig<any, any, any>'

src/index.ts:28:5 - error TS2322: Type '<TReturn, TArgs, TContext>({ document, variables, context, info, }: { document: any; variables: TArgs; context: TContext; info: any; }) => Promise<AsyncIterable<unknown>>' is not assignable to type 'Subscriber'.
  Types of parameters '__0' and 'params' are incompatible.
    Type 'ExecutionParams<TArgs, TContext>' is not assignable to type '{ document: any; variables: TArgs | undefined; context: TContext | undefined; info: any; }'.
      Property 'variables' is optional in type 'ExecutionParams<TArgs, TContext>' but required in type '{ document: any; variables: TArgs | undefined; context: TContext | undefined; info: any; }'.

28     subscriber,
       ~~~~~~~~~~

  node_modules/@graphql-tools/delegate/types.d.ts:110:5
    110     subscriber?: Subscriber;
            ~~~~~~~~~~
    The expected type comes from property 'subscriber' which is declared here on type 'SubschemaConfig<any, any, any>'


Found 3 errors.

graphql-tools-type-mismatch-repro's People

Contributors

domkm avatar yaacovcr avatar

Watchers

 avatar  avatar

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.