You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 20, 2020. It is now read-only.
and I'm getting this error when I try to run my project
TSError: ⨯ Unable to compile TypeScript
2|SMALA-Ga | server/graphql/proxy/index.ts (18,43): Argument of type '{ schema: any; fetcher: ApolloFetch; }' is not assignable to parameter of type '{ schema: string | GraphQLSchema; link?: ApolloLink; fetcher?: Fetcher; }'.
2|SMALA-Ga | Types of property 'fetcher' are incompatible.
2|SMALA-Ga | Type 'ApolloFetch' is not assignable to type 'Fetcher'. (2345)
the message of the error is clear so when we check accepted parameters by introspectSchema we find ApolloLink | Fetcher only :
but ApolloFetch which is the return type of createApolloFetch is not accepted export declare function createApolloFetch(params?: FetchOptions): ApolloFetch;
well this issue can be fixed by changing the fetch to ApolloLink for example but personally, I like ApolloFetch due it's flexibility on changing the request parameters --> I mean something like this:
#I'm Trying to create a remote Schema and Im doing it like this:
and I'm getting this error when I try to run my project
the message of the error is clear so when we check accepted parameters by introspectSchema we find ApolloLink | Fetcher only :
but ApolloFetch which is the return type of createApolloFetch is not accepted
export declare function createApolloFetch(params?: FetchOptions): ApolloFetch;
well this issue can be fixed by changing the fetch to ApolloLink for example but personally, I like ApolloFetch due it's flexibility on changing the request parameters --> I mean something like this:
I'm Using TypeScript with ts-node
I'm not really sure about supporting typescript in Apollo because I found other typing issues that I will report them in different threads.
The text was updated successfully, but these errors were encountered: