AEB-labs / graphql-weaver

A tool to combine, link and transform GraphQL schemas
MIT License
240 stars 20 forks source link

Fix links with typePrefix (#49) #51

Closed FX-HAO closed 5 years ago

FX-HAO commented 5 years ago

I got the following compile errors:

src/extended-schema/extended-schema-transformer.ts:93:19 - error TS2322: Type '((config: GraphQLFieldConfigMapWithMetadata<any, any>, context: FieldsTransformationContext) => GraphQLFieldConfigMapWithMetadata<any, any>) | undefined' is not assignable to type 'TransformationFunction<GraphQLFieldConfigMapWithMetadata<any, any>, FieldsTransformationContext>'.
  Type 'undefined' is not assignable to type 'TransformationFunction<GraphQLFieldConfigMapWithMetadata<any, any>, FieldsTransformationContext>'.

93             const fn: TransformationFunction<GraphQLFieldConfigMapWithMetadata<any, any>, FieldsTransformationContext> = maybeDo(transformer.transformFields, fn => fn.bind(transformer));
                     ~~

src/pipeline/helpers/link-helpers.ts:262:5 - error TS2740: Type '{ [key: string]: any; }' is missing the following properties from type 'any[]': length, pop, push, concat, and 26 more.

262     return fetchBatchOneToOne(keys);
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Found 2 errors.

So I added "skipLibCheck": true

Yogu commented 5 years ago

Thanks a lot for this! Sorry it took me this long to review, I will release it with some other changes in the next days.

The skipLibCheck was already present in the npm scripts, so it's nothing new to set it in tsconfig.json