Closed spa5k closed 3 years ago
When we try to directly use the example from README.md
const UserType = t.objectType<User>({ name: 'User', description: 'A User', fields: () => [ t.field({ name: 'id', type: t.NonNull(t.ID) }), t.field({ name: 'role', type: t.NonNull(RoleEnum) }), t.field({ name: 'name', type: t.NonNull(t.String) }), ], });
The Typescript compiler starts giving this error - Expected 2 arguments, but got 1.ts(2554)
Expected 2 arguments, but got 1.ts(2554)
Looking into the types in node_modules, It looks like it has been changed to -
field(name: string, { type, args, resolve, description, deprecationReason, }
And when I try to use it, compiler starts giving warning that resolve needs to be added.
I'm not sure how should be handled since even in docs resolve has only been added in queryType not in objectType. How it should be handled?
When we try to directly use the example from README.md
The Typescript compiler starts giving this error -
Expected 2 arguments, but got 1.ts(2554)
Looking into the types in node_modules, It looks like it has been changed to -
And when I try to use it, compiler starts giving warning that resolve needs to be added.
I'm not sure how should be handled since even in docs resolve has only been added in queryType not in objectType. How it should be handled?