graphql-codegen-apollo-next-ssr icon indicating copy to clipboard operation
graphql-codegen-apollo-next-ssr copied to clipboard

contextType is added as import

Open mrtnbroder opened this issue 4 years ago • 1 comments

Latest update generated the following line in my output file:

import { getApolloClient , any} from '~hooks/useApollo';

because the contextType is added as an import (which is wrong).

setting contextType: "" fixes that line but generates wrong syntax for other lines:

- (options: Omit<Apollo.QueryOptions<Types.CalculatorQueryVariables>, 'query'>, ctx?: any)
+ (options: Omit<Apollo.QueryOptions<Types.CalculatorQueryVariables>, 'query'>, ctx?: )

mrtnbroder avatar Sep 07 '21 09:09 mrtnbroder

I made a change to address this earlier. https://github.com/correttojs/graphql-codegen-apollo-next-ssr/pull/258

martijndeh avatar Sep 07 '21 19:09 martijndeh