cdaringe/postgraphile-upsert

error: postgraphile-upsert is not assignable to type 'Plugin'

hkong opened this issue · 1 comments

hkong commented

I've added the plugin as noted in the README, but I'm getting this error in VSCode

error TS2322: Type 'typeof import("/Users/hkong/devel/feServer/feserver/graphql-server/node_modules/postgraphile-upsert-plugin/build/postgraphile-upsert")' is not assignable to type 'Plugin'.
  Type 'typeof import("/Users/hkong/devel/feServer/feserver/graphql-server/node_modules/postgraphile-upsert-plugin/build/postgraphile-upsert")' provides no match for the signature '(builder: SchemaBuilder, options: Options): void | Promise<void>'.

I'm using node 16.15.1, ts-node 10.9.1, typescript 4.7.4 and postgraphile 4.12.9. What is really strange is that I have other plugins ( ConnectionFilterPlugin and PostgisPlugin), and they do not have this error.

Is there something I am not doing correctly?

You can see it works in typescript from the tests: https://github.com/cdaringe/postgraphile-upsert/blob/main/src/__tests__/main.test.ts#L5

I’m sorry, but general TS support is for stack overflow