Closed schuma7 closed 5 years ago
Can you check your lockfile npm
or yarn
to see what version of @types/graphql
is being pulled in - I'm guessing it's an older one than the one nexus
was built with, as that's the only thing I see that might be causing the issue.
I believe the version you have does not specify GraphQLObjectType
args as having a default, and the build .d.ts
has:
export declare const isInterfaceField: (
type: GraphQLObjectType<
any,
any,
{
[key: string]: any;
}
>,
fieldName: string
) => boolean;
Anyway, adding "@types/graphql": "^14.0.7"
to your devDependencies
should fix it.
Changing to ^14.0.7 has indeed solved the issue, thank you very much for your swift response!
I'm using nexus together with apollo server and noticed that the following schema:
produces these compilation errors:
I've noticed the following:
ts-node-dev --no-notify --transpileOnly --respawn src/server.ts
works without any issues (Using ts-node version 8.0.1, typescript version 3.2.4)I'm using Node v10.5.0 and my package dependencies are as follows: